As mentioned at Section "University", this is the actual main function of university for many people. And it fulfills it quite well.
In a closely related sense, university is simply a symbol of personal status. Not a place where you go to learn. And especially in the Anglophone world of fancy colleges, university also doubles down as a form of long term luxury hotel. Even if it ends up meaning debt.