University was mostly a core of classes that everybody needed to take, free electives that let me take whichever classes I wanted, and then degree courses which were a subset of my classes.
We over-fixate on the major in these discussions because we look at the crazy American education prices and then think in $/major. But otherwise I'd say university does a decent job of making people credentialize in generally important concepts. And this process helps you in life, like being able to think and speak intelligently on any topic.
I think it's the gross expense of uni that causes us to push people into majors like STEM that can be directly transmuted into dollars. But I don't think that's best for society. And it's an unhealthy approach to education.
For example, if I could redo university, I would've majored in philosophy. It's just obnoxious that I had to make that decision somewhere within age 17-20.