Inasmuch as these people have a “fragile ego”, you probably also have a fragile ego. Virtually everyone subconsciously adapts their behaviour to gain the approval of other people whom they value.
The difference between you and them is not that you have a strong ego and are confident in your masculinity, it’s that you don’t value the views of people who judge people on that basis. And that is certainly no bad thing, but it’s a fundamental difference, and making this error makes it very hard to understand people who are different from you.





At best you can call people who do this as having a very mild form of unconscious bias; you can’t infer bigotry which I would say really ought to be either a consciously-held opinion, or if not then a set of behaviours that has a practical negative outcome.
I think the kind of person you’re thinking of is a stereotypical bigoted jock who hangs out with his jock-friends and makes homophobic jokes all the time. That person we’re maybe not surprised that they are motivated to avoid doing stuff associated with those outside their gender.
But I don’t think (and there’s nothing here to suggest) that it is only that kind of person who is so affected. Do you think that someone respectful of gay people, but who grew up in a conservative family and whose father makes comments like that, might not be motivated along the same lines out of a desire to their father? Or is it bigoted to seek the approval of your dad if your dad is a bigot? Even if it’s not done consciously?