This comment is from That Guy on “Which is more expensive, prison or Princeton?”
Some services are more expensive than others because of the nature of the service or the nature of the demand for services. Incarcerating people who are dangerous to society will generally be more expensive than teaching people who are there voluntarily and can leave at any time.
If you required that students never leave campus for four years, shoot them if they try to escape, keep them under constant surveillance, and check their dorm room for contraband on a regular basis, outlawing all drugs and subjecting them all to random cavity searches, the college would be a lot more expensive.
I think a better comparison is between money spent on mental health institutions compared to prisons. Mental hospitals (or whatever the correct term is today) are probably half the cost per-person than prisons. When the mental hospitals shut down or can’t take any more patients, many of those patients wind up in prison instead. So, in some cases it’s pay a little now or pay much more later.