I think there is a basic core root for the hatred/fear/dismissal of homosexuality. A long time ago, governments could rule the masses with force, but that took a lot of bodies flowing in to the ranks of soldiers. Force alone tho would not work 100% of the time to rule in the masses, and the leaders knew that, so they partnered with churches ( hence, todays tax free status of prime real estate if the church owns it) The church- be it Catholic, Protestant,Muslim,Jewish, or any other- had a directive- scare the fuck out of the masses with the prospect of some super being watching their every move, and anyone who misbehaves will go to HELL!! (or whatever evil place their book of fiction created) And since both the church, and the government , needed foot soldiers ( priests) , those men who found sexual pleasure and release with another man were not producing fresh babies to be fed into the military or rectory. In a weird sense- the church and the government knew what cum sluts today know-- cum is a very honored and precious item ! So birth control was taboo, homo sex was taboo, abortion was the ultimate taboo. Church and state thrived as their followers grew and the sheer mass fed the church ( as I recall, the Catholic church had a certain expectation that one son or daughter from each family would follow the "calling", and of course governments recruited the young into the military--some as a civic responsibility; other times by force-- and hence they had fresh bodies to throw at their next enemy.
A lot of our current shifting of opinion comes from a connected society- fewer people exist under the dominance of the church as they became educated and aware, and today, most warfare can be done by robots and drones, so having a non stop supply of hard bodied young people is not the same crisis it might have been even 50 years ago.
And, maybe if everyone was at least bi-sexual, there would be a much greater resistance to killing that hot fucker across the trench from you, and instead a nice long hot sweaty fucking would be better <g>