Which ones? I know a few countries with those qualities, some of them filter out the bad students really early on or into another stream of education (typically slower, lower quality), as in before you're 9, not 20.
Cheap studies don't turn students into mindless debauchery-loving zombies, but they also put a pretty hard cap on the professors' salaries. As long as your school is really a not-for-profit organization, salaries will be mediocre.
Elite American universities can attract top scientific talent from overseas with good salaries and very well equipped labs, because they have the money. This, in turn, attracts foreign students.
It's just human nature, and human nature is the same everywhere.
I know a German who spent over 20 years in the German university system, taking advantage of every free program so she wouldn't have to get a job.
For a well known trope, the spawn of first generation wealthy people tend to dissipate that wealth. They didn't work for it, and so they don't value it. It's why people look down on nepotism. Things not earned are not valued.
And I know an American who spent years trying to get through a degree program that he never ended up completing because he was too burned out having to work multiple jobs to live at the same time. Just like I know plenty of Swedes who have and continue to study, developing their knowledge and curiosity for free while being enthusiastically productive members of society. We all have anecdotes.
Many educators have pointed out that cuts in government funding for higher education in the US now mean that the student is the paying customer and, as they say, "the customer is always right". Institutions have financial motivations to overlook students' incompetence, cheating, and other misbehavior as long as they keep paying tuition fees.
My dad (career military) told me that army boots lasted 3 times longer when the GIs bought them out of their uniform allowance (and could keep unspent funds), rather than being issued boots. He always laughed about that.
When I was old enough to do work, he'd have me buy my own shoes :-)