lemme tell you:
Judah has this son, Er, who has a wife. Er dies because he was struck down by the Lord for being wicked. Now, in Jewish, law, the next younger sibling has to perform his now dead brother's duty to have children with his wife. Onan, Er's younger brother, is assigned to f**k Er's wife. He refuses, "spilling his seed on the ground." For that. God struck Onan down too.
The end.