When student loans were first set up in the 90s, they were only to cover the cost of living (food, accommodation, clothes, etc.). At that point tuition was still free, and there was still some grant funding in place too. Students like myself graduated with £10k of loans or less. The government envisaged that some students would fail to pay it off, but they would be a minority, and the amount of loan per student was relatively low.
Then tuition fees were added. Now the amount of loans became high, but the government still thought that (a) only expensive courses in top-flight universities would be charged the full amount, and (b) that those courses would still lead to higher pay. What they failed to account for was the cynical manipulation of students by universities.
First of all, every university immediately charged the maximum fees for every course. The government had explicitly said that this should not happen, but they found (as they'd been warned) that mere guidelines are worthless.
And secondly, every university immediately devalued its courses. The number of places for courses was massively increased, and the number of courses available was increased too. One effect of this was that many people started university who simply were unable to keep up, so lost whatever fees they had paid when they failed in the first or second year. And the other effect was that whilst before there were generally suitable jobs available for graduates, now there were not nearly enough jobs for the number of graduates. In the 1980s less than 20% of people went to university; now it is at least 32% of 18-year-olds, and over half of young people in total. In the meantime the standard of tuition has been reduced, as demonstrated by the number of Firsts now awarded; although this is merely a continuation of the reduction in quality of school-level teaching and grading.
The result is that the university system is now designed purely to extract money from students, loaned to them by the government on terms which the majority will never be able to repay, for education which in the majority of cases does not prepare them for a career or increase their earning potential. It is not designed to educate students well, only to squeeze them well for money.
My personal favourite example is my hobby, music. The magazine Sound On Sound estimated that there were approximately 20 roles available per year in recording studios; whilst the combined output of all universities in the UK was thousands of music technology graduates per year. Of course the vast majority found on graduating that their degree was worthless after graduation.
Universities were not required to link their courses to the post-education success of their students though. For that matter, they still aren't. So long as they can continue to con students into paying, they will continue. It's notable that all universities strongly opposed any form of league tables on student outcomes or student satisfaction rates.
And so we are where we are today. Universities continue to fleece students, and the government is having to make provision for a bill which will come due eventually.
It is worth noting that this applies to universities in England and Wales. Tuition fees in Scotland have remained free for Scottish and European Union students. In Scotland, only 23% of 18-year-olds enter higher education. I can't readily trace outcomes for Scottish students, but it does seem clear that the same "grade inflation" from England has not taken place in Scotland. Without a basically-infinite supply of tuition fee money conned out of students, Scottish universities have to operate within budgets set by government, meaning that student numbers have to be lower. By making this more selective, and by ensuring all students have access to education regardless of background, Scotland has largely avoided the mistakes of the English system.