My university years were good for a few things, but major career training was not one of those things.
My university degree, though, was essntial for opening doors.
Every useful thing I learned about writing software I learned on my own -- all the core, and much of the advanced, stuff I learned before I ever set foot in a classroom; all the rest after I started my first job. None of the time between those two points yielded much of anything useful, but all the desirable jobs required a 4-year degree from an accredited university.
So yes, universities are a huge scam; but most businesses are in collusion with the universities to make them, for all intents and purposes, a required rite of passage.
Fortunately, though, I had the good sense to live with my parents until well after I graduated, so I paid off my entire student debt in about six years.