A hundred years ago, only a small percentage of the population went to university. Academia while not exclusive to the rich, did have a much higher share of gentlemen scholars who where not in need of an income, or at least had friends in high places willing to serve as patron. The subjects themselves where also much newer, thus a PHD was not always forced to investigate an ultra specialized niche.
Then a correlation was discovered, those with university degrees tended to be set for life. A degree itself soon became almost a basic requirement for any mid-level job, so the lower classes started flooding the universities and the expectation that everybody will earn a degree. So qualification inflation started to happen, a degree is no longer enough, you need a masters or a PHD now to secure your place in the job market.
The government sets a budget for science research, and we still have a number of rich patrons and alumni donating into the system, but the ratio of research funding to university students has gone down considerably (because the student population has rapidly increased) and the ratio of PHD students to available professorships has gone up.
There are too many people chasing too few places, but it takes a generation for the lesson to be learnt, and the promise of our parents generation was that degrees where rare and near gaurentee of a successful job. The truth has always been that success often requires standing outside of the crowd, and its impossible to create a standardized formula to achieve this.