This is making the incorrect assumption that moderators are somehow limited by the rules. They're always able to justify anything via sufficiently vague rules ("this isn't an exhaustive list" etc) or even just ignoring the rules and banning people they dislike, because for the most part, people don't notice unless they go after someone well known.
All a CoC does is setup the illusion of open and unbiased enforcement.
It's like how cops have rules about needing reasonable cause to search vehicles lending them some legitimacy, but they simply have a dog trained to signal for something suspicious even when there isn't anything, allowing them to claim reasonable cause without being able to be questioned.