If you are a woman or black or ... you will very likely experience sexism or racism. You will probably also see more, because you are used to identifying it.
If you say "a third [1] of the people in this group experience a bad thing" I would say that's pretty wide-spread.
The OP was specifically saying "it's not widespread, I've never seen it" [2]
I'm not trying to claim there's a nefarious subtext. I'm not saying the op is sexist or racist. I'm just trying to point out that a lot of people experience this, and one of the stated goals of CoCs in open source or at conferences is to help combat it. I think that's a good thing, and while you or perhaps others have pointed out that a community could combat such negative behavior without a CoC, the CoC does give some indication of how such behavior will be dealt with (before I join the community/attend the conference), which can increase my confidence recommending a conference or increase someone else's confidence attending (or participating in an open source community etc)
[1] https://psmag.com/news/sexism-in-the-tech-industry
[2] not a real quote so please correct me if it's way off, I'm being lazy
Also, I know they were referring to open source - maybe they've seen workplace sexism etc and were specifically excluding that. In that case I'm definitely misquoting and apologize
It's just hard to imagine how racism or sexism would enter into to a community like this because the race and sex of the participants is not known, and you're not even discussing races or genders at all, heck you're generally not discussing people at all.
It happens. People leave tech communities because of it. I don't know what else to tell you. I've provided citations to this effect in a bunch of other comments.
It's important to note, though, that people can do or say racist or sexist things without targeting it at someone. That would still impact someone's decision to stay in the community, even if the person who said it didn't mean to offend them.