Actually, according to Genesis 38, Onan was killed because he refused to do his filial duty to his brother’s wife, Tamar, to whom he was obliged to provide a son (who would then be considered his late brother’s son, for the sake of inheritance). Instead, he simply used Tamar physically, making certain that she would not conceive through their intercourse.
Hmm…
Onan was especially close to God? Onan, who was the second son of Judah by a Canaanite woman? Hmm…
And yes, “the wages of sin is death”. But here, Paul is contrasting ‘death’ to ‘eternal life.’ In other words, he’s talking about the fact that Christ has saved us from eternal damnation with His sacrifice that brings us eternal life. The wages of sin – what we ‘earn’ from sin –
is eternal punishment; but that doesn’t mean that sin literally kills us on the spot, like it killed Ananias and Sapphira in Acts…