It's not just residencies, governments also actively restrict how many hospitals can be built. I'd rather have the government break up the doctor's modern equivalent of a guild and encourage more private practices rather than just shoving more cheap foreign labor into the existing PE firms and continuing to gatekeep young students out of the industry.