The Story of Onan

Genesis 38:6-10

It was late in the day and Beth's father asked her to please take the kitchen trash and set it in the garbage place beside the house. Well, Beth knew that the garbage was going to be picked up the next day and that the garbage cans had already been taken out to the front of the house, so she put the kitchen trash in a big garbage bag and set it out by the curb.
That night, dogs tore open the garbage bags and made a mess. When Beth's father saw what happened, he punished Beth by pulling the heads off of all of her dolls.
Later, Beth asked her mother why she had been punished when she had just been trying to do what was right. By way of explanation, her mother told her a story. And this is the story she told:

One day, there was a man named Judah who had a young son named Onan and an older son named Er who was married to a woman named Tamar.
Because Er was a bad person, God killed him.
Seeing that Er had died without having any children, Judah went to Onan and said, "Onan, go to your brother's wife, put your penis in her, and make babies because your brother didn't."
Onan knew that any child he had with Judah would be Er's child and not his, and he didn't like that. So when he put his penis in Judah, he didn't put the spermies in her but spilled them all over the ground so that no babies would grow in Judah's tummy.
This made God so mad that he killed Onan, too.

"You see, Dear One, God tells us that it is more important to do what you are told than what you think is right," her mother said. "That's why you got in trouble."
Beth thought about this for a moment. Then she smiled and hugged her mother. All her questions had been answered, and she would be much more obedient from then on.