In the same way that any other organisation has rules, which they agree amongst themselves.
The joy of a free (as in not being arrested) society is that if you don't like those rules you are free not to join. Or free to moan about them repeatedly until everyone dogpiles on them to change the rules, or not.
Either way, they are allowed to make rules how they like. Just as you are allowed to not like those rules, and talk about it incessantly.
As I said, CoCs are just rules, some of which _you_ don't like