Silly Rabbis indeed.
If you read the actual passage where the act takes place, you will see why God killed Onan.
http://www.christianpatriot.com/onan.htm
Wow, that’s the worst piece of spin regarding the Onan incident I’ve yet witnessed. I thought I’d seen them all. Pathetic piece, not at all in line with the universal 2000 year Christian teaching regarding that scripture. Blatant attempt to justify sin.