Why are tuition fees for PhD students so high in the USA, despite not taking any class?
I think it is essentially a scam. There are essentially 3 types of students (1) self funded, (2) departmentally funded, (3) externally funded. For departmentally funded students the tuition fees are essentially meaningless and just represent money being shifted around internally. Self funded students can be really hurt by large tuition fees, but departments can offset these fees by partial departmental funding (again just internally transferring money around). The scam comes when students are funded externally and the external funder is required to pay the full fee (and potentially even indirect costs on the tuition fees). Things get messy when the funding has a cap on tuition fees. For example the NIH NRSA pays 60% of the tuition up to $16,000 plus a $4,200 "institutional" allowance. Most departments I am aware of offer a tuition subsidy to individuals who get an NRSA.
It is worth noting that high fees not only puts PIs at expensive universities at a disadvantage (okay to be fair, it reduces their advantage) in that their research is more expensive than someone at a cheaper university, but it also puts them in an ethical dilemma. When tuition fees make hiring a PhD student more expensive than a post doc, it is hard for a PI to justify hiring a PhD student.
Because, as you mentioned, they are paid for by someone other than you. This happens in any subsidized industry/system. Interestingly, the subsidies grow over time instead of shrink -- the reasons beyond that are something you should ask an economics professor; it is a distinct trend.
You'll find folks who say this is the way things should be as much as you'll find folks who think its a scam. It is a logical outcome of the current academic system, may be a leading indicator of its eventual demise, and at the moment is something you should probably not dwell on unless you happen to actually be an economics postgrad (in which case I doubt you would have posed the question in the first place).