These code of conducts all boil down to "don't be a dick." It's too bad we need them, but we clearly do. Certain groups (LGBT, minorities) tend to get more abuse than others, so issues involving them are often spelled out more explicitly.
All large organizations have written standards of conduct. Open source software projects these days are often large, and are made up of heterogeneous groups of people. It's obvious that CoCs can be useful just the same, to reduce ambiguity in conflict if nothing else.