My somewhat anecdotal recollection (from a good university) was that most PhD students stayed on by default as a way to continue in education with the campus lifestyle - except inevitably in a diminished way. If it wasn't this then it was to fulfill some naive ambition about making their academic prowess have some direct impact on the world.
So I think most of these problems are almost inevitable. A student goes from undergrad, where they are learning to close to the limit of human understanding in their subject at a break kneck pace, to perhaps (e.g. a physicist) spending 3 years studying what shape of foil best reflects microwaves in some particular manner.
Socially most of their peers have moved on.
Progress in science has been increasingly pushed beyond the reach of often otherwise brilliant individuals.
They have a project of often dubious value which is a completely different challenge, and a completely different value proposition to what they were doing in undergrad.
These problems are probably not well communicated, because everyone has a vested interest in continuing the lie. The PhDs generally don't want to admit failure and a poor life choice, the 'system' doesn't want to lose prestige/funding and the public want to maintain an unrealistic image about the practice and progress in the sciences. Most of the actors involved have essentially good intentions, yet it's leading to wasted talent and severe mental health problems.