I have several mixed opinions on this.
University is deliberately prolonged. They give you small snippets of knowledge and tell you that you need to wait a week for the next snippet, frequently with knowledge that makes sense only when you have all the pieces shown together referencing each other. And then exam at the end - it rewards people who laze through most of the course and only start learning in the last month or week before exam, turning most of the education into stamp-collecting game similar to watching a tv series (and people marathon/binge those too).
Most of the university education is also worthless on job market. 90% of knowledge you will be using in a company will be company-specific (processes, rules, tools, people) and thus not possible to gain at the university. Employers require university degree as a proof that you are able to come to the same boring, tedious place and waste your time for eight hours a day, five days a week each week. Online courses would be better off tied to specific companies rather than to degrees.
Then again I firmly believe no skill can be attained through theory alone. Not every university has practical exams, but no online course has them at all. This is, I guess, the only advantage of universities. Perhaps a hybrid system would be best? Theory can be learned at your own pace from online course, but then exams - both theoretical and practical, must be done at the physical location.