Universities are not schools and should not be compared to schools. Universities don't provide less than schools: they provide something very different, higher level specialised education.
Universities cost a lot to run. Think about provision of facilities (particularly in STEM subjects) and provision of libraries (massive costs, relevant to humanities courses). Think about the numbers of support staff needed to run an institution with tens of thousands of students - support staff for academic issues, personal issues, housing, careers etc.
In STEM subjects students typically have 15+ contact hours per week. In addition to contact hours all students have work marked regularly and marking that work takes much longer/is much more specialised than it is for lower level courses. In an essay subject, a staff member might well spend 3+ hours marking a single student's work.
Lots of classes aren't actually large - many third and fourth specialised classes can have less than a dozen students and run at a huge loss, i.e. the amount of fees paid nowhere covers the cost of delivering such classes.
Teaching material at universities is not standardised and is not provided by educational publishers. For me to deliver 24 hours of lectures from scratch takes me a bare minimum of 120 hours of preparation, probably 200 hours. In other words, it can take me 5 weeks to prepare the lectures of one single course, even before I have taught the course, marked assignments, held office hours, marked exams, attended all committee meetings related to the exam etc etc.
Every university sets its own exams. Setting and marking one single exam can take upwards of 100 hours of an academic's time.
£9000 per year doesn't cover the costs: universities need non-EU undergraduates paying higher fees to break even on most courses and many universities throughout the world charge far more.
The main point I would make is that the government chooses not to pay for the facilities/infrastructure of universities from a separate budget, i.e. the vast majority of universities' income is now from student fees. This is arguably wrong, since at least half of universities' function is research. The fraction of facilities/infrastructure/staff time devoted to research should be paid for by the tax payer directly, rather than expecting it to be paid by current students in their future tax.