And no one has ever designed a CR system that allows for enemies that exploit a specific party weakness or allows for players who exploit a specific strategy or monster weakness.
For example, consider a party that makes considerable use of Hypnotic Pattern to neutralise threats. That will mean that monsters with immunity to charm are a far higher challenge than those without. But then the next party comes along, and they don't have Hypnotic Pattern.
Not only is CR next to useless, there is no way to design a CR system that is not next to useless.
The vast majority of D&D adventures considered "classic" were designed before the existence of a CR system, and very few after. One might even consider the CR crutch an impediment to good encounter design.
well no, that's not quite right.
Again, it's a tool. It's a predictive tool. So, with any predictive model, you have to make assumptions. So, you can't assume that you have a group of several casters that can largely endlessly spam Hypnotic Pattern. That's the DM's job. You're expecting CR to do everything, and it just doesn't. And it never has.
And, let's not forget, you're taking a really extreme example. A group that solely uses charms is a really weird group and likely only exists in theory crafting white rooms. Far more likely, the group has a range of abilities because the group is smart enough to know that not all creatures can be charmed.
The CR system is based on assumptions. The further you go from those assumptions, the less accurate CR will be. Of course. That's the nature of any predictive system. This isn't a secret though or something that couldn't possibly be known or deduced. It's pretty obvious. I guess they probably should state it up front, but, again, there's gotta be at least a minimal attempt by the user to understand the system when using it.
/edit to add after checking
Oh wait, they actually DO tell you about this. There's a nifty little sidebar on page 82 that talks about how some monsters might not line up exactly with their CR number and the DM needs to be aware of this.