If everyone had PhDs then those PhDs would be able to produce many more goods and services than exist now.
If everyone was doctors, then healthcare would be plentiful, and nobody would suffer from not having access to healthcare.
If the world was full of software engineers, then we would have a plentiful amount of software.
This is easier to consider by thinking about the opposite situation.
Imagine if we got rid of all of the doctors, software engineers, and farmers? What would happen?
We would quickly lose access to all of our healthcare, new software and then all of our food.