e.g. If one culture hates dogs and kills them on sight, you might say that culture has a prejudice against dogs. If 95% of cultures hated dogs and killed them on sight, you should start to think there is a deeper reason for that (especially considering how useful dogs can be).
In the case of gay-shaming, the obvious common cause is evolutionary: It's people trying to have more grandkids.
If your kid is gay, and decides to go off and have gay sex for the rest of his/her life, he/she won't reproduce. Your gene line ends.
However, if you pressure/shame/tyrannize your gay kid into a reproductive relationship, your genes replicate into grandkids (who likely won't be gay themselves). Your gene line continues.
This also applies to brothers, sisters, and other kin. The reproductive benefit of pressuring a gay relative to act straight is comparable to saving them from death, since the outcome of 'acting gay' and 'dead' is evolutionarily similar. (Of course a living gay relative can help other relatives raise their kids, so it's not identical to being dead. Some have argued that the "helpful gay uncle" effect would counteract the evolutionary cost of homosexuality. But the math doesn't work; a childless relative isn't so much more helpful than a relative with kids that deliberately childless individuals replicate their genes better than ones who have their own kids.) This explains why the pressure to act straight is so strong and vicious - it comes from the same place as the pressure to not die.
So, given a population of people, some who have a gene that makes them pressure gay kids to act straight, and some who don't, over time the pressuring gene will spread through the population. And here we are.
And just to ward off the reflexive moralizing and personal attacks: There's no moral content to our evolutionary history, any more than there's moral content to a lion eating a baby gazelle alive. Please don't fall for the naturalistic fallacy and start attacking as though I'm saying natural equals good. Lots of things that are natural are not good. Understanding the world requires us to be able to separate rational understanding what is, from a moral judgment of what we should do. We should be adult enough here to make that distinction.