Let me give you an example: you have a group of friends. Two of your friends have recently experienced a miscarriage. The implicit rules in your group have now expanded to include "no dead baby jokes" (depending on how dark your group's humour was, this might always have been a rule). The reason for this expansion is that two members of the group will now be hurt, upset and offended by those jokes. Making a "dead baby joke" is now a good reason to think the offender is an insensitive idiot, who probably isn't someone you want to be friends with.
This is no different from "no jokes about fags" when your group includes gay people. But sometimes, some people insist on being able to make "fag jokes" because "snowflakes are over-sensitive". Of course, they may not know the group includes gay people, and the gay people in question may not want anyone else to know their sexual orientation (none of anyone else's business). So it's better to spell it out explicitly that "fag jokes" are not allowed, even though there are apparently no gay people in the group. This is what a Code of Conduct does.
Yes, there are Purity Spirals that end up pushing this to extremes. But that's a separate issue. Codes of Conduct are still a really good idea.