Its a symptom of several things by my anecdotal estimation
- Bootcamps & self learning resources don't emphasize CSS. JavaScript gets you hired. A huge amount of web developers in the last 5-7 years came out of bootcamps and career switchers self learning, and the resources available overwhelmingly focus on frameworks and JavaScript, to the point that I've been in interviews where someone can give really good answers if the answer is framework specific but they don't basics like `call` or `bind`.
- See previous comment. JavaScript gets you hired. Rarely, if ever, have I seen candidates get rejected because they lacked proper CSS knowledge nor have I seen it be appreciated on the same level as having "deep" JavaScript knowledge
- CSS isn't programmatic[0] like JavaScript. The rules are different, and more fuzzy. Its one of its strengths, but its also a bit of a weakness, as you can't simply algorithmically design something and test its outcomes. You have to understand spatial concepts like placement and understand how to design / create with tools that have multiple different ways of achieving the same outcome alot (but not always). CSS does have more "exceptions to the rule" than JavaScript does.
- In many ways, it doesn't help that CSS has had no API culling. IE, we know that flexbox / grid are much preferable but many developers don't grok things like when you should use negative margin, border vs outline, or proper usage of media queries. Then you have things like color formats, e.g. HEX vs RGBA vs HSLA. Which one is "better" isn't obvious to many. There's alot of CSS features like this.
- In many ways, CSS has a bigger surface area, a much more expansive API, and way less backing documentation from the community. MDN is pretty good, but its not exhaustive (nor could it ever be, really) to every situation.
- The reliance on CSS frameworks / generators. I think a big part of the popularity of things like Tailwind is you can just "try until it works the way you want" by throwing combinations of different classes together that a developer may semi-understand should work together until something happens, basically, which side steps having to have deep knowledge of CSS in many ways, or take bootstrap. Bootstrap made it easy to build websites following a formula. There are many other examples of this.
- Developers really don't understand how to properly leverage the cascade. The industry general notion is "avoid it at all costs" because the same thought that goes into organizing your logic (JavaScript) isn't given to CSS. There's really bad hygiene practices in our industry with regards to CSS and its derivatives (SASS, LESS)
[0]: I realize CSS is turing complete if you abuse custom properties a certain way or with the recent addition of container queries you could model this as well. I'm talking about it more in the way that CSS isn't like JavaScript, in that you have no familiar programming constructs (like if statements, for loops etc). Yes, I understand in the most literal sense, CSS is technically a programming language, but in practice, I don't think it is (at least, not yet)