I'll not argue over why they came into existence as the idea seems good enough (and if you'd asked me a few years ago I'd even said it was a good idea), but now I'll ask:
Over the years I've heard a number of times where a CoC has been used to make a lot of trouble in projects that where originally more or less healthy.
I read my it and open source news from Ars Technica, HN and from time to time Slashdot though, so I might be heavily biased.
Can anyone point me to one ore more projects where CoCs have actually improved open source/free software projects or communities?
As I already mentioned I guess originally I would have thought it was a good idea, but over the last few years I've heard either nothing or problems from projects that adopted a CoC.