Some may disagree, but the root is very much shame, imo.
A lot of the parents of gay peeps I know were pretty chill about queerness, until their kid turned out to be one and they were shamed by their community. One of them started crying immediately when their kid came out and screamed about what society would say, but then adjusted and decided to prioritise their kid after a few hours.
I usually find Homophobia to be instilled through religion or hate media - In that sense There isn't really any systemic homophobia through non-abrahamic religions, which make up most of the country. That said, there has been a recent trend of few online personalities (few religious ones among them) copying western right wingers and denouncing trans people - which I find worrisome.
Most of the homophobia I have encountered I'm people here has usually been instilled through movies or online communities or through interactions where gay is used as an insult.
A homosexual kid who moves away will probably still be targeted, sadly. It's the "rebellion" that's the issue - there are many cases of honor-obsessed weirdos that have targeted their family peeps who went against the norm in different ways.
Imagine the whiplash I got, when I went online and saw people hating on three storied building with their own gardens, and calling them commie blocks, acting like it was the greatest indignity to live in them. Yikes!