We do not live in a culture where, traditionally and currently, it is the norm for females and males to glance around looking for attractive people of the opposite sex and, upon finding them, indicate that attraction in a mirror-image reciprocal manner and toddle off to bed and/or relationship together.
What we have instead–definitely traditionally and, while not absolute and universal, still quite the significant factor currently–is an environment in which males do (and are expected to) pursue females far more openly, far more aggressively, than vice versa, in a non-reciprocal, non-mirror-image manner that posits males as the appetites and females as the objects of lust. (For example, behavior that might be regarded as a pretty blatant and explicit sexual come-on if exhibited by a woman, e.g., saying to a male at a singles bar “You haven’t asked me up to your apartment yet, why not?”, might scarcely register as serious flirting when exhibited by a man towards a female in the same singles bar. )
That means the men who end up with sexual access to women end(ed) up in that situation not as a consequence of being cute + female lust being expressed but instead as a triumph, an accomplishment. He “won her”. Usually this winning had/has to do with some sort of competition with other men, and not really in quite the same sense that attractive women are in competition with each other (i.e., to successfully inspire male sexual appetite and direct interest). In fact, it is portrayed as a triumph over the attractive females (who “surrender” or get “taken”, as if they’d never engage in such activities if given any choice in the matter) as well as over the other males.
With that being the case, you have a lot of psychological room in which for males to be attracted to females but to be at risk of being “heterosexually ineligible”, of being unable to compete effectively to get women. And homosexuality is/has been painted and portrayed not as “oh, some guys just find other guys cute instead, that’s the way they are” so much as "if you aren’t man enough, if you aren’t a winner, if you get beaten by the other men in the Big Competition, you are a fuck-ee, a homofaggot, you are triumphed over just as the “taken” women are, you’re more like a woman than a man. And by definition, that’s all about losing and ending up in an undesirable situation that you’re supposed to be trying to avoid! So of course there is much contempt for them!
So logically you’re going to have a widely shared fear of failure in this general endeavor, as with any competitive endeavor. So if you’re afraid of losing and being “turned into a homo”, how are you going to react to real live actual gay guys, who are in theory the ones into whose lot you’re gonna get cast and with whom you’ll end up having sex as a consolation prize if you don’t triumph in the Heterosexuality Iron Man Competition thingie?
I wrote more extensively on this perspective in a sociology paper "Same Closet, Different Door: A Heterosexual Sissy’s Coming-out Party which is available online here.