Why do nerd fandoms gatekeep?

I’ve been subject to this all my life and I’ll just never get why fandoms do this. It was way worse in the early 2000’s when I would show up to a DnD or mtg club (male dominated) and get treated either with suspicion or awkwardness or down right hostility. I’d be made to show I’m a real nerd not a fake nerd which was just absurd and while eventually they warmed up to me it took a lot of effort to break that ice.

Fortunately it isn’t as bad nowadays as Nerd culture is far more diverse and welcoming but it still is a thing I find every now and then.

Is there a reason this happens? Is it simply because I’m a woman or does this happen with new male nerdy types too that want to join a group?
Why do nerd fandoms gatekeep?
Post Opinion