It's incredibly common for LGBT people, full of self-hate, to act in a homophobic way towards other members of their own community. Just like school bullies, it's a way of dealing with their own insecurities.
Remember what the father of the shooter said? He said that "God should punish the gays". You can see where the shooter's self-hatred has come from. Clearly he would not have been accepted and loved by his family.
This is an extreme example of what external homophobia can do... and of course, it in no way excuses what he did. But hopefully people will realise what affect it can have on people if they are alienated from their family and their religion just because of their sexuality.