I think in some cases it threatens a person's view of 'how things are' or at least 'how they ought to be' and their reaction to feeling threatened is to get their attack in first.
People will argue that it's 'not natural' and talk about evolution, or that it's 'obviously' wrong, or that it's against God's will. But it boils down to "I like the idea that people fall into two neat genders, and sexual attraction and relationships are neat and tidy one-of-each, and I don't want to have to deal with life being more complicated than that"
Men in particular I think feel threatened that another man might fancy them - they are not used to thinking they might be on the receiving end of unwanted lust. And also that women who are gay are deliberately making themselves 'unavailable' to men which goes against their tendency to think that women 'ought' to be available, at least in theory.
Religion gives people an excuse. But the reason religions label things as 'unacceptable' is usually just codifying what the society in which the religion developed felt anyway.