I mean I went to one back about 15 years ago. Even then it was a few hundred bucks per class, not including books which could still be $2-300 each.
Community college is cheaper, no doubt, but a full time student in many areas could still easily clear $4k in a single year.
Including books? Room and board?

There is some legitimate problems there. Now I am going to speak from my own experience as someone at the older end of the millennial generation.
When I was graduating high school there was a lot of factors at play. In an objective sense a local community college makes a lot of financial sense. But there are issues. Some of it branding, some of it marketing, some of it real. Part of it is we are asking 18 year olds to make 6 figure decisions without a lot of understanding on their part, especially first gen college kids (hi, its me again!).
But community college was looked down on. And in many ways, especially in engineering, many public universities are considered ‘second tier’. Three is an implicit understanding that better schools = better opportunity. The quality of the education at many universities may be equal, but there is some cultural understanding that having a degree from an Ivy has some greater opportunity on the back end than a similar degree from Eastern Illinois. Not that you would get a bad education per se, though sometimes this may be true, but that an equivalent degree from Yale or Eastern would favor the Yale grad on the job hunt. To what degree this is true or offset by the cost is not something well known or published, and so high school students are operating with limited or bad data there.
Secondly, and tied in, is the understanding that better universities that give greater opportunity and education may not be possible to attend if you defer the first two years at a community college. Again, how accurate this is is hard to ascertain, but it is a real consideration. So you go to community college you may foreclose on your choice of university and be unable to get into the programs you want, and have to settle for a second tier. You are taking a lower financial cost of known amount for an unknown opportunity cost. Given the stakes, for those whom it is an option, it becomes hard to go with the financial aspect of going to a community college when you are weighing that unknown opportunity cost. So if MIT accepts you, you go to MIT.
Third there is a stigma, especially for high performing students. I graduated at the top of my class in high school. CoD was considered the college for kids who wouldn’t be able to hack it in a ‘real’ university. For me to go there would have felt like a failure out of high school. I was the straight A student who graduated honors, and got accepted to multiple prestigious engineering schools. Waiting 2 years and not knowing if I would be able to attend in 2 years time while going to the local community college full of the marginal students getting their associates before working retail for the next decade? People whom were not my peers in high school? That is a tough thing to do, no matter how much financial sense it may make. Especially given all the other factors, and the lack of family experience.
I am all for making it a more appealing option, for helping kids make the best decision. None of what I wrote is meant as a judgement against community college at all. Merely presenting a portion of the factors I personally experienced when making that decision 20 years ago. Add in the various pressures from school councilors pushing me towards the more expensive universities? Community college was an option that did not feel like a valid option for me, and students like me. It existed as the default choice for the screw ups and lesser students. Not top end national merit scholars like me.
The entire system is designed to create those incentives and pressures to lead kids into the more expensive options. Individual 18 year olds, especially those without the financial savvy of college grads, are hard pressed to navigate this.
You are able to deduct some college expenses from taxes. It doesn’t help much for many though, as it isn’t a credit, merely a deduction. The net effect was I paid no effective federal tax many years while in school. But I didn’t receive any tax credits like with EITC or CTC.