I felt a bit of this as a child, it's just social pressure and anxiety about being outcast. I'd imagine that often being more outspoken about it is from insecurity because someone might actually be gay (or bi) and either not want to admit it to themselves or at least not want anyone to find out.
In many cases it's also probably some deep hatred of anything that goes against what they consider "right", but that too ultimately mostly stems from social pressure about honosexuality being seen as "wrong"