I think this question isn't easy to answer. Of course we can say its because religion or morals or because people are stupid and all of this is true, a bit at least.
And yes, religious people think often they have the morally high ground in their very narrow perspective. But those people also think the earth was created 6000 years ago...
In my opinion, this hate has a few different sources:
1. Lack of intelligence
2. Lack of empathy
3. Jumping to the first conclusion that comes into mind.
4. Not to be able think about something logically and without emotions
5. The strong belief to be 100% right
6. The way I live my life is the best and everybody has to live his life my way.
7. People that like other things then mentioned in 6. must rot in prison or die.
Ok, first point is easy. People with an above average or high iq tend to be more open minded, to view both sides and are dont judge a book by its cover or the first 5words ( I like Sex with dogs )
This often comes together with (2.) deep empathy. If you cant mirror and understand others feelings, you tend to believe they think and feel the same as you.
3+4 If you are shocked by smth, you tend to dislike it. You dislike it, you dont like to think about it. Emotions. If you are able to think about controversial things and things you don't like without emotions, then you may come to another opinion.
5,6,7 Is (in my opinion) the mindset of every ultra conservative and/or religious person.
If you look at the hate the LGBTQ+ community is facing in the USA at the moment, you can find the same pattern.
Narrow minded, ultra conservatives loose their mind about 2 men loving each other. (7.) Trans people? Some politicians claim "Men just want to go to the womens restroom (3.) and people who have never thought about trans people belive this (1,2,3)
They hate LGBTQ+ for the same reason they hate us: They don't understand and don't want to, they don't feel that way so it must be wrong. And if it's wrong it has to disappear and never exist again.
Yes, that's a lot of text and thoughts, but it is a very complex theme and a simple answer is mostly incomplete.
Have nice day,
KL