To a very large amount of people, college is "just that place you go after highschool but before becoming an adult". I like to think that most of those people wise up or drop out pretty quick, but it seems pretty undeniable that a lot of people at least start the process without the appropriate amount of consideration.
If you want to do a quick ad-hoc study of a population with massive selection bias, just find the daily "I was told a college degree would get me a job. I was lied to." post on reddit, inquire if they researched the job market before picking their major, and watch the "I picked my major for person satisfaction! give me a job!" replies and downvotes roll in.
...actually don't do this. It is very frustrating.
I think fewer students check actual job prospects less frequently than you might expect. Rather, they go with their gut or influence by people close to them (teachers, family members, etc...) who are probably just going from the gut anyway.
Not many, but most have a decent sense of how dropout graphs relate to ultimate income, and have a sense that engineers make a lot and comm majors less.
The other issue is one I've written about before, but universities have basically begun to practice market segmentation but with academic ability: people who want a really rigorous university experience can find one in hard science, engineering, philosophy, and some humanities departments, and people who just want a degree can find one in comm, sociology, many business schools, and a few other places.
Back then, I made the choice of not pursuing computer science because I entered university soon after the dot-com bust. I came from a third-world country, and the general theme then was that there wasn't much of a future in software engineering, that unemployment rates amongst programmers were horrendous. Which was true, back in 2005.
Wound up getting a different engineering degree. Things didn't turn out too bad, but in hindsight, I really wished I did go for that CS degree.
Also most people I know who majored in so called un-marketable fields did so knowing full well what the job market looked like and did take that into account. They just came to the conclusion that studying what they wanted to study, rather than what was economically expedient, was more important to them. A few of them have even, through hard work and dedication, beaten the odds and managed to end up in a well paid dream job in their chosen field.
I know plenty of people who started college in engineering or computer science knowing there's good paying job opportunities in those fields. But a big chunk of those people drop out once they start taking the more difficult courses.
Retention is just as important as getting people into STEM in the first place but it's hard to retain students who aren't adequately prepared for the challenge.