The problem isn't with codes of conduct in the abstract, but with the specific code of conduct that GitHub used. It explicitly permits racism, sexism, and cisphobia as long as they aren't against the wrong groups:
> Our open source community prioritizes marginalized people’s safety over privileged people’s comfort. We will not act on complaints regarding:
>
> ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’
> Our open source community prioritizes marginalized people’s safety over privileged people’s comfort. We will not act on complaints regarding:
>
> ‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’