Feminist answer: Because men are misogynists.
Actual answer: Because men respect women.
That answer might sound completely nonsensical at first, but let me explain.
(Also, I'm not saying that there exist no men who don't want women in their playgroups because of very sexist reasons. Of course there are. However, I'd argue that those are a minority. In the majority of cases where this happens, the reason is rather different, which I'll explain below.)
Think of it what you want, but on average men's psychology is different from women's. Men do not get easily offended, and are rather stoic. When men who are close friends are engaged in a hobby, they often like to trashtalk. This trashtalk may sometimes even sound highly offensive and insulting to an outsider. Some of it might even be technically speaking "sexist", even though the men aren't actually sexist in the least. That's just trashtalk. And that's just how men's brains work. It's a form of male bonding. It may sound like a cliche, but that's just how it is.
However, immediately when a woman enters the picture, things change completely. Now all the men have to be careful about what they say and do. They have to tread very carefully, so as to not be offensive to the woman and hurt her feelings.
They do not do this out of misogyny. They do this out of respect. They do not want their typical trashtalk to offend the woman.
But the thing is, this sucks the fun out of the whole experience. They cannot let loose. They cannot "take a break" from social norms, and have a fun session of whatever, and of male bonding. Suddenly they have to be serious and respectful... and boring. It's just not fun. Many men do not want this. It just kills the playgroup, the whole idea.
(Of course some men keep trashtalking regardless, often offending the woman in question. But that's usually a minority of cases. Also, I'm not saying that all male playgroups are like that, but many of them are. And of course there are really tomboyish women who are "one of the boys", so to speak, and trashtalk as much as any of the men. Sadly they are also a very, very small minority.)
Of course feminists love to twist the narrative and accuse men of misogyny. Even though it's the exact opposite: Not misogyny, but respect.