In this case the use is that the maintainer took the time to create it. You can argue that it is useless. Even the maintainer seem to largely agree. So why not have it? It is already there. Why show negativity.
A CoC is a bit like a trademark. To be useful it has to be enforced. So it can just sit there, and if nobody bothers to look at, it will just occupy some extra bytes on some server (Github).
> That paradoxically leads to worse behavior.
Yeah, it might be right. But it is a hypothetical. Let's think of a positive hypothetical upside -- for example the first thing comes to mind is it sends a message to minorities, women, those who are shy, beginners that this project is approachable. We are attempting to be sensitive and welcoming by at least spending time to create a CoC. It is a general message perhaps as well "We are aware these kind bad things happen in the programming community so we did something about". That's it.