I don't think "github" does it; it's lobbyists either within or outside of Github - the SJW's, what used to be called the PC Police - that push agendas like this forward. Same happened / is happening with Reddit, to some degree - again the slippery slope mentioned above.
Now, the problem isn't these policies forbidding certain behaviour or language; the problem is that they're measuring with different sticks. In Reddit's case, it was banning subreddits making fun of fat people, whilst keeping racist and corpse-fetish subreddits around. In Github's case it's banning one 'offensive' word, while "git" itself is offensive and they should really censor themselves first before demanding their users do it to their own work.
AFAIK there's no official list anywhere of "Words You Shouldn't Use" on github either - which makes the enforcement of this thing completely arbitrary.
In practice, for Github and most companies, it is their customers who decide. Companies are beholden to their customer's for existence. That is why they pay so much for PR (trying to mold their customer's opinions into ones favorable to the company).
They're both. They're a private company that offers a public service. As such, they can't do whatever they want. For example, if they wanted to ban all repos written by black men, that would be illegal.
Nobody is suggesting that banning a repo for using a bad word is illegal. A breach of trust, a breach of ethics and a breach of reliability[0], but not illegal.
[0]: if I were a company, I would be thinking twice about trusting any of my business to Github. If a British employee commits a word that is commonplace in Britain but very offensive in America (like 'fag'), does that mean my repo goes away? Could I mess with another company by purposefully taking one of their commits out of context and creating an internet controversy over it on twitter?
Strictly from being a company that pursues profits, they can't do "whatever they want" because they want to maintain their userbase.
But, being a private company means they have a "right to do whatever they please" (property rights).
But having a right to do something doesn't mean people can't criticize those decisions or be right in those assessments.
Are you talking about cigarettes or gay men? It's pretty easy for github.
> Who decides what is and is not appropriate?
Github does. That's how that works.
If you prefer you could try and lobby your government to set up some sort of national source code repo. Maybe you'd find the rules on such a thing more to your liking. (Note: You really, really wouldn't.)
Alternatively, you could host your own source code repos, and then you can set the rules.
Edit: More generally, you seem to suggest that a place where a lot of people from different backgrounds come together to try and collaborate and work should be a place with no rules, norms, or even an expectation of basic politeness. Offhand, I'd think the opposite should be true.
You're also conflating something like, eg, efforts to get around the Chinese firewall with people who want to use slurs. People have, in my view, in intrinsic right to do both, but these are still not equivalent actions, and you're not going to reach a sensible conclusion until you abandon that moral relativism. Free speech is valuable, but not all speech is equally valuable.