The problem is not CSS per se, but HTML.
HTML was designed to be a document language, like a PDF, but worse because it has no absolute positioning so text just changes shape when you change the width.
Almost every website does NOT follow the "document" paradigm but an "app" paradigm with navbars, sidebars, panels, etc. None of these things fit the model HTML was specialized for.
If HTML/CSS were for those things, we would have had scoped rules for classes day 1.
Exactly. The problem is the platform has not kept up with the way it's used in practice. Features are added with strange priorities, and obvious blind spots ignored, leading to it being under-developed in many areas, and over-developed in a handful of others. We get vendors working on weird stuff like Web Bluetooth before obvious things like element anchoring (finally, yay... but still just a Working Draft) and reliable element position tracking (still a huge pain).
There are still no affordances for many things, so people have to invent their own solutions.