I dunno, this is the kind of opinion that seems trivially easy enough to falsify that I have to wonder about the real rationale behind it.
If you take a look at the labor demand for skilled front-end engineering (https://www.levels.fyi/), it's hard to come to any other conclusion than that major companies pay a lot of money for top talent. So if major companies pay a lot of money for that talent, either they're making profit from a very tricky coordination of skilled labor, or you're pulling an argument out of an opinion that is at odds with the reality of the industry.
Why do that? It could be that you're not familiar with how skilled frontend practitioners operate in large companies. Maybe that's why you're extrapolating (incorrectly in my opinion) that a) the web frontend ecosystem is trash and b) that is evidenced by cream of the crop CS graduates (???) choosing backend over frontend. My question is, what does that have to do with the reality of frontend today?
Maybe it once was useful to consider why CS graduates gravitating towards one end or the other, but that division seems a little old in the tooth now. Good CS graduates these days have full-stack chops, and don't have too much trouble crossing devops, frontend, backend -- anything necessary to get the job done. So with that said, it's hard to consider your final conclusion anything than a rant about your own difficulties and preconceptions about frontend web development than anything:
> The net result: the front-end ecosystem looks like the first BASIC program written by a 10 year-old who just got his first computer: it's a mess, it's unprincipled, it's grown organically, it's driven by fashion and immediate business needs, it's an unmaintainable tarpit, and it's increasingly a nightmare to build with.
It's true that there's a lot of the front-end ecosystem that is super messy. But there's a lot of it which works a lot better in comparison to what was available a decade ago. Moreover, it's intrinsically gotten more complicated as mobile compute has gotten more powerful. Mobile has not just become a thing but achieved critical mass on par with desktop. There are enormously lucrative challenges involved with front-end these days, and who knows how much headroom is left in the industry? The modern phone's capabilities today are so far beyond what was possible even four years ago, that it's hard to consider these kind of rants anything beyond a lack of imagination.
How is it that the largest megacap companies of our time are using better frontend experiences it to accomplish increasingly more revenue efficient activities than they ever have before? How is it that newly fledged startups are using the leverage of good frontend experiences to grow to $1B faster than they ever have before? Is it possible that UX and psychology account for far more of technology's value than you may be considering? Just a thought.