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.