We have a corpse, Onan’s. He was killed for something he did. Now, let me list down all of the possible motives: 1) Onan pretended to follow the levirate law by marrying the widow of his brother. (2) At the same time, he also refused to follow the levirate law by refusing to impregnate the woman he now married which was required by, and in fact was the very purpose of said law! (3) Onan was insincere and dishonest. If he really had no intention in the first place to observe the levirate law, he should NOT HAVE MARRIED his brother’s widow.(4) Onan refused to follow the levirate law all the way, what he did has now fallen beyond the realm of the mild punishment as mentioned in the Deuteronomy passage.
All the above are reasons cited by non-Catholics. Let me add some more for good measure. (5) Onan’s failure to perpetuate his brother’s line was a form of fratricide. (6) Onan broke his marriage vows to Tamar. (7) Onan failed to fulfill the terms of his marital contract with Tamar. (8) Onan failed to display piety toward his dead brother.(9) Onan was vain, he didn’t want to father a child he couldn’t call his own. (10). Onan coveted his brother’s property.
Okay. To the non-Cathlics’ four, I added six more. Now, I will add the Church’s reason: Onan was killed because his “wasting of his seed by an intrinsically sterile type of genital action violates the NATURAL LAW to which ALL men, Jew and Gentile alike, are bound (cf Romans 1:26-27; 2:14).
Now which of all these possible offenses of Onan deserve death? The answer is really simple: only one– the last one. All others are punishable with Halizah (the Unshod ceremony) or divorce, but NOT death.
Non-Catholic readers may cite Ruth 4. Here’s what the Jewish Encyclopedia has to say on the matter: “The case of Ruth is not one of levirate marriage, being connected rather with the institution of the Go’el; but the relations of Tamar with her successive husbands and with Judah are an instance (Gen. xxxviii.).”
They may also cite Ananias and Sapphira, likewise Moses, but I don’t see how they are related with the question at hand.