Why do we have a Code of Conduct?

Introduction

On June 2nd, 2017 Reddit user ergzay asked this question in a thread titled "Question's about Rust's Odd Code of Conduct":

This seems very unusual that its so harped upon. What exactly is the impetus for the code of conduct? Everything they say "don't do X" I've yet to ever see an example of it occurring in other similar computer-language groups. It personally sounds a bit draconian and heavy handed not that I disagree with anything specific about it. It's also rather unique among most languages unless I just fail to see other languages versions of it. Rust is a computer language, not a political group, right?

The biggest thing is phrases like "We will exclude you from interaction". That says "we are not welcoming of others" all over.

Edit: Fixed wording. The downvoting of this post is kind of what I'm talking about. Questioning policies should be welcomed, not excluded.

Edit2: Thank you everyone for the excellent responses. I've much to think about. I agree with the code of conduct in the pure words that are written in it, but many of the possible implications and intent behind the words is what worried me.

Which is a fair question. This is a difficult topic to talk about with people. If you've never been at the receiving end of the tech world's not so nice side this just seems extreme. The thread itself is a great discussion and worth reading many of the responses and can be found here

However, the best response came from the original creator of Rust, Graydon, and how they responded in the thread is reproduced in full below.

Graydon's Response

Well, I wrote the initial CoC and put the "We will exclude you from interaction" phrase in there, so maybe I'll mention the impetus and meaning.

I was given the opportunity to start a language project by my employer, Mozilla corp. I'd had the experience of working -- both professionally and on volunteer time -- with many PL communities in the past. Communities that were prone to several norms of discourse that I found extremely difficult to deal with, that would have prevented me, and several people I knew and wanted to work with, from bothering to work on a language at all. In other words: I would not have built the language, nor participated in a project of building the language, if I had to subject myself to the kind of discourse normally surrounding language-building communities.

In other other words: the norms of other communities were already excluding me.

So I wrote down the norms and behaviours that I knew chase people away (including myself) and said look, in this community I'm setting up, on these servers that my employer is paying for and paying me to moderate, this behaviour is not welcome. It's a big internet and we can't prevent people from behaving how they like in their own spaces, but we can control who we interact with in online spaces we set up. So these are the ground rules for those spaces.

I was careful to chose the phrase "exclude from interaction" because, in practice, that's all one can control on the internet, and it's silly to pretend one has more control over a situation than one does. I can't control what you do on your time, on your own servers, on your corner of the internet. I can only control who I interact with.

As it's happened, lots of people felt the same way: the rust community has attracted and retained a lot of people who did feel they were repelled from other PL communities because they're so aggressive, so abusive, so full of flaming and trolling and insults and generally awful behaviour, that they had given up even participating. Many people have found a home in the rust community that they had not been able to find elsewhere.

Some people, naturally, feel that the norms spelled out in the rust CoC makes them feel excluded. To which all I can say is, yes, it's true: the rust CoC focuses on behaviour, not people, but if there's a person who cannot give up those behaviours, then implicitly it excludes such a person. If someone just can't get their work done effectively or can't enjoy themselves without stalking or harassing someone, or cracking a sexist or racist joke, or getting into a flame war, or insulting their colleagues, I suggest they go enjoy the numerous other totally viable language communities.

Or heck, fork the community if you like. Make the "rust, but with more yelling" community. Big internet. Knock yourself out.