But in K-12 education, the taxpayer/state has strong control over what's taught. In the last few years there's some latitude by the students, but nothing close the panoply of programs offered by universities. If education is state funded, but only for programs with proven ROI (eg. STEM), I'd be fine with that.
Public funding models often have incentives for delivering the degrees the state wants. For example, there could be field-specific quotas for degrees. The university gets paid for each degree up to the quota, but not for exceeding the quota. That can have interesting effects in fields that are popular but in low demand. For example, the acceptance rate to psychology can be as low as 2-3%.
If you get into Stanford but can't afford it, a loan seems like a good idea, but in reality the loan eligibility should consider the degree and future earning potential (along the same lines of how banks qualify other types of loans).
If we simply cancel student debt or remove private colleges' ability to charge a market rate the result will be no more private colleges (similar to other countries with fully publicly funded education). In these countries you typically have a national exam that determines where you go, or you have to lottery in to a school if it isn't in your district.
It isn’t necessary, no, and in fact a flat super simple tax code would probably result in more tax revenue. However, since politicians like the power of the tax code, and because the wealthy like a complex tax code for all the loopholes, and since ordinary people like the idea of those wealthier than them paying more tax as a percentage of their income, then we’re never going to get a simple tax code.
We can say the same thing about K-12 education -- it's just something we choose to fund collectively, because that's the kind of society we want to be.
But also, progressive taxation means that the rich fund it more than the poor. So the general idea is that if law school and medical school are expensive to provide but result in vastly higher salaries, then it gets paid for in the end out of those lawyers' and doctors' taxes. Not the taxes from average Americans.