The number of residency slots (a legal requirement to be a doctor) is limited because it's funded by Medicare and only Congress can increase it. AMA (American Medical Association) has lobbied to keep it that way.
don't think many other entities besides the federal government have a ton of incentive to fund residency. and the federal government does have caps on residency slots
[1] https://slate.com/technology/2005/06/private-funding-for-res...
Interesting related thread: https://www.reddit.com/r/Residency/comments/a01cfr/funding_y...