> Communities were doing just fine without a CoC
I mean kinda, but also not. CoCs just codify what the moderators think.
Even Hacker news has a CoC: https://news.ycombinator.com/newsguidelines.html its just called a guide.
A community has to have a set of rules which most people agree on. One of the most common attacks in a moderated forum is "Oh but X did Y" and "thats not fair X can do it"
A CoC can be a simple way to "tap the sign" when someone is being a dick.
It also allows communities to set expectations at the start, not after someone has transgressed and pissed in the well.
In an ideal world, you'd just have a thing that says "don't be a dick" but that doesn't work for many and hilarious reasons. Engineers who who either have a god complex, parsing issues or empathy gaps (either learnt or inherent ) are notoriously difficult as a community to keep from getting into frothy arguments that colour everything and give off a bad smell.
CoCs are a tool, that can sometimes help.
I perceive "guidelines" or "rules" having a very different connotation compared to a "code of conduct."
See for, example, the SQLite team adopting the Rule of St. Benedict as their "Code of Conduct," getting criticized for it, and changing it to a "Code of Ethics" in accordance with the Rule about seeking accommodation with your adversaries.