The homophobia of the Bible is extremely easy to understand. Small warring tribes need people. They need more people than the neighboring small warring tribe. Therefore babies are needed. Lots of babies. So you have stories of a tribal war demon god who kills Onan for masturbating. He's not making babies for the tribe.
"The family that prays together...is brainwashing their children."- Albert Einstein