If this is true, then you almost have to concede the model is broken. There will be a glut of PhDs compared to faculty positions. One of the reasons so many PhDs are disgruntled is because of the false expectation that every PhD is on track for a professorship.
I picked a random public school to see if their program states the intent is to produce faculty[1]. It seems like research is the other half of the goal along with teaching. Lots of research is done outside of faculty positions.
"The doctoral degree, i.e. the Ph.D., is primarily intended for students desiring a career in research and/or collegiate teaching."
[1]https://cse.engin.umich.edu/academics/graduate/phd-in-cse/
PhD training prepares people for the academic career and faculty positions. Less than half of PhD graduates actually end up in the academic career. So yes, you could say the system is ...not perfect.
Imagine if a trade school only had a 50% employment rate for their intended purpose and forced the students to work at a fraction of their market value for the privilege of attending, while profiting off that labor...I don't think imperfect would be the word used.
In 17th century Leiden, 40% of surgeons' apprentices dropped out. In Utrecht's Coopers' Guild, only about 10% of apprentices became Masters.
On the other hand, getting rid of the guilds in the 1820s and replacing it with less formalized vocational training during industrialization didn't change the system for better:
>A lengthy contribution in the journal of the Dutch Society to Advance Industry in 1891 criticised the condition of Dutch training in detail: ‘Nowadays boys leave one boss after the other for the greatest triviality . . .. The boss continuously fears that the boy will leave him to use his acquired skills with another boss. Bosses therefore slow down training by putting boys to work at specialised repetitive tasks, so that they bring in the highest profits.’
CS programs may be different, but engineering and physics were definitely geared for academics
I ask because all of the PhDs I've worked with outside of academia are from engineering and physics, save one from sociology and three from psychology. (The latter were geared to human factors of engineering problems).