Universities don't "fund" Ph.D. candidates. They pay them salaries - or what should be recognized as salaries - to do research. In more normal states (such as the Netherlands), nobody is trying to deny this fact, and PhD candidates are formally in a employer-employee legal relation with their university. In other states (such as the US, or rather individual states within the federation) there are on-again-off-again legal struggles regarding this question.
As an example, look for the US NLRB decisions 332-111 (October 31st, 2000, NYU) and later decision 342-42 (July 13 2004, Brown U) edit: and the recent and excellent 364-90 (August 23 2016, Columbia U).
By the way, even employment in teaching isn't always recognized, and occasionally (again, in the US specifically, but less so in recent years) universities try to pass off the teaching work as training/learning experience and not pay PhD candidates for it.
Now, of course it's not quite that simple: The relation of a PhD candidate and his/her university is not entirely the same as that of the line worker and the factory, or the typist and office etc. When you're in a PhD program you are still learning and acquiring skills; however, unlike an undergraduate student, you do this mostly by carrying out actual research work (and perhaps also teaching work). These two types of activity are what a university is supposed carry out, so you are significantly contributing to realizing the university's (ongoing) objectives. A PhD candidate is a trained professional in his general field already when s/he is inducted, and s/he gradually acquires expertise, hones skills, and trains in the research aspect of his/her discipline, as opposed to other applicative aspects of it.