The Story of the Bad Little Boy is a short story by Mark Twain that is often paired with the Story of the Good Little boy. It was published in 1875 and tells the story of a young boy who acts like the bad boys who are in the Sunday school books but for some odd reason things do not go horribly wrong for him, a point that the narrator points out repeatedly.
One of the things that people like about fiction is that there rules in general. And one of the most basic of these rules is that if you do bad things bad things are going to happen to you. This is especially true when you have some type of rules. These rules could be the TV and movie code, the comic book code, or the general culture of the time period and it is easy to assume that things are somehow different now than they have been, but the truth is that these problems have always existed and Mark Twain points out just how absurd the idea that bad things will automatically happen to someone who is doing the wrong thing in the story of the Bad little boy.
I have not read the Sunday school books that Mark Twain did but I have seen more than enough things to understand. The most notable for me are comic books from the age of the comic code. These were stories in which anytime a character broke the law something negative had to happen to them, even if it didn't make much sense. The same was true of movies though I have seen far less of those movies. Regardless though the humor of the idea that someone would think it was very odd that bad things didn't happen to the boy just because he acted badly. In instead has a good time and things go well for him.
Most of the things he does are the same things that we would teach kids now, not to lie, or cheat or steal, but on top of that you have one that is a bit odd, which is going fishing on Sunday. I understand the idea that you should be in church but it simply is not something that people would assume would be as bad as it is in this story.
There is a lot of humor here but it also makes a good point not only about life but about writing which is that bad things don't always happen to bad people and it is not why we should expect people to act in a moral manner.