"How and why it has become perverted into an expression of anger and contempt is a tragic mystery."
Sadly, it's no mystery. You can tally it up on the social influence scoreboard as a point for Christianity in our society long before the Protestants, Puritans and others. Most of the cultures the Church assimilated (often somewhat violently) were far more sex positive. Some were matriarchal / matrilineal / nature based. Some while still primarily patriarchal like the Romans, saw sex as a part of life. but just as the Church needed to counter Rome's polytheism with monotheism, it needed to counter women's power in outlying areas, small villages, etc by deeming them flawed. Original sin, and all that. It's amazing, what subjugating a full half of a society can do. Part of their mechanism for spreading a binary patriarchy were the Church backed kingdoms that sprang up all over Europe. To gain the Church's favor, they had to have male lineages. Anyway, mixed in with all this was a full restructuring of sex to be a combination service a wife provide for her Master (uh, I mean "husband" and something interwoven into the religious beliefs (part of assimilating matriarchal cultures). So, a binary patriarchy it had to be, and sex became very strictly regulated via theocracy.
During roughly the same larger timespan, the story behind the early Church outlawing gays as priests though is a fascinating tale that involves St Anselm of Canterbury, his superior who was also his partner/lover/soulmate, and England wanting to tax the Roman church enough to hurt. Rome countered this by outlawing gay priests, who would incur the higher tax. Anselm fought this and was able to make the Church hold off, at least until after his death.