There is a monetary compensation in most fields.
Even though the PhD student might be bad, it is all his doing and choices, he can freely learn new skills and develop himself.
Even a horrible degree can lead to a comfy job.
It depends on the field, in chemistry it looks like exploitation in engineering it's totally different.
In art, languages, etc getting paid to learn is already a cherry on top.