I don't know exactly what my teachers were doing but it all came to a screeching halt in college when I encountered severe gaps in my knowledge that made Calculus my hardest class. I had missed some very important lessons from earlier on that were huge hangups. It's hard to differentiate an equation if you aren't solid on how to factor the variables.
I used MOOCs to learn various programming languages, simple database queries (insert, update, select with join, etc.) and how to use APIs with JSON. Lots of fun stuff. But when I came to university I started being taught all kinds of math and CS stuff through difficult assignments and tight deadlines that I never would have done on my own.
Yes, you technically can learn a lot of math and other things through MOOCs but it's not always as fun. The advantage of university is that they give you a set of required courses for a major and you have to take them, whether they're fun or not. Sometimes the courses which are the least fun turn out to be extremely valuable later on.
The same is true for the output of your work.