Sure, but wouldn’t a city have to increase salaries to allow someone to be a nurse or teacher in an expensive area? Similarly, one can be a nurse or teacher in a lower cost of living place. No one forces you to teach in SF.
Example: every city the United States.
It’s like saying “traffic is good because it forces to government to build more roads.” No, it does not.
No kids, no need for teachers or any kind of education system.