One is that increased demand for employers for "certification" of ability pushes demand for degrees among students. Every recession there's articles showing that those with a college degree fare better than those without. We can argue about why that is, but that's what the average 17 yo sees, along with their parents, and they don't want to be left behind, regardless of the details.
Another is that loans basically prop that up and facilitate it. So schools don't lose money on people who say "I can't afford it" because they find a way.
Another is the increasing administrative bloat at universities, which are now largely run like for-profit institutions even when they are not on paper. I think this is similar to a lot of fields, but my sense is that (based on personal experience) things are much more hierarchical now, with more of a focus on exploiting the university for personal gain than anything else. So administrative salary costs, and administrative costs in general, drive up the need for costs.
The public colleges have to compete for private colleges for faculty, administrators, etc. which then increases their costs, which then drives them to bigger need for more tuition.
At the same time, states have been cutting their funding. If they cut funding and unis have all these fixed costs, where else are they supposed to get money from?
A major dynamic between public universities in the US and political circles in the last couple of decades has been an increasing pressure for them to operate as revenue generating, profit-making institutions in every aspect. At the state level, the idea is that their role is to bring in money, at less cost (an alternative is to see them as providing a service to the state and country -- can you imagine wanting K-12 schools to be treated as profit-making ??? ). As a result, what we've ended up with are institutions with a lot of profit-seeking administrators, pyramid schemes, taking advantage of federal funding loopholes at every chance to bring in money, etc.
Public universities should be able to offer a good value to students, but they're being run as profit centers. If you think of it that way, it's no surprise tuition isn't competitive.