I don't have hard numbers (if you know a good source, please do share), but it is quite apparent that there are many more Ph.D. student positions advertised than PostDoc positions, at least in my field (engineering/CS, Europe). My feeling would be that many labs I know have a ratio of maybe 5-10 Ph.D. students to 1 PostDoc. Why is that the case?
Specifically, why do professors or funding organizations prefer hiring a Ph.D. student to hiring a PostDoc? I know that the latter are a little bit more expensive in terms of salary*, but they will generally also be much more productive. (I'm just comparing myself now at the end of my Ph.D. with myself at the beginning of it.) If I were a professor now, had enough money at hand and could choose freely how to spend it, I'd aim for a much lower ratio, maybe 2 Ph.D. students to 1 PostDoc. Why don't people do that? Are there funding constraints (if yes, for which reason)? Aren't there enough qualified applicants (I would doubt this)?
In the larger scheme of things, hiring more senior researchers and less Ph.D. students would also contribute to solving the much lamented (at least in Germany) problem that there is a lack of viable scientific career paths short of becoming a professor.
One final comment: in an earlier question of mine, someone replied that universities have a teaching obligation, thus effectively obliging them to hire Ph.D. students instead of PostDocs. However, in my country (Germany) and field, Ph.D. students are not really seen as students; they are essentially fully paid staff researchers. (They also do not visit any lecture courses.) I do not believe that supervising a Ph.D. student is seen as "fulfilling the university's teaching obligations", although I might be wrong about that.
EDIT: Since the question of ethics and "do people actually want to stay in academia" came up a few times, here are a few articles about the detrimental effects of job scarcity at the postdoc level:
- https://www.nature.com/articles/d41586-020-03235-y
- https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0250662
- https://www.nature.com/articles/d41586-021-01548-0
- https://www.sciencemag.org/careers/2008/08/science-careers-poll-results-realistic-readership
*This will likely vary by region. In another answer, someone claimed that PostDocs are twice as expensive as Ph.D. students. In my institution, however, the pay gap is much lower. Maybe around one fifth or fourth?