>>73939373There are two converging parables from Genesis. "Sodomy" comes from the story of Lot, where the people of Sodom threaten to bugger him if he doesn't turn over a pair of angels he's sheltering to their rape mob.
However it also gets combined with the parable of Onan, who is killed by God after he pulls out during sex to avoid impregnating his partner.
The former informs the general christian condemnation for male to male rape specifically, while the latter is frequently construed as forbidding ALL forms of male ejaculation which do not occur in a vagina. This is why religiously influenced "sodomy" laws often explicitly outlaw a number of consensual sexual acts between a man and a woman, under the impression that anything outside of procreative vaginal intercourse will anger God.
This is also why you hear the old christian trope "if you masturbate, you'll go blind." Blindness was the punishment for the people of Sodom threatening Lot, whereas Onan was actually just fucking murdered.