Except that some % of PhDs go on to be professors (who do a real service), and every once in a while you get a PhD student whose work probably contributes hundreds of millions of value to society. And every couple years or so, you have a PhD student who contributes billions to society in value.
Not to mention PhDs usually have to TA (teach students), which accounts for some of their pay.
There's no example of a PhD work that contributed hundreds of millions of value to society.
(I could say there's no way to measure "value to society", in fact this concept means nothing, but I agree on settling on "an enourmous amount of productive capital to someone, not exactly the society").