Fees for UK students are fixed at a low level by the government. They then pay an additional fee to the university for each UK student. EU law means that this same system must also be made available to residents of other EU states. The additional subsidy that the university is paid by the government is usually not enough to cover the actual costs of tuition. Consequently universities charge students from outside the EU fees which are usually at a higher rate than the actual cost of tuition in order to further subsidise home students.
The system is one that is created by governments, not the individual universities. There is considerable pressure from some universities on the government to allow them to charge UK and EU students more money for their courses. Naturally this is a sensitive political issue within the UK and lower fees for international students are unlikely to occur in the near future.
Other countries such as the USA or Singapore charge home and international students at the same rate. They later gain economic benefits from these highly educated students who often stay on to work in the host country for a few years after graduation.