I didn't pull it out of my ass. It's basic logic that if you remove a supply restriction then the supply goes up.
Let's attach fake numbers: Right now only 50 people can get residency each year, and 80 people starting college each year want to be doctors and would work hard enough. If you let everyone get residency, at first you'd make 80 doctors per year. This would decrease doctor pay and then only 75 people would want to be doctors, then 70. But if this ever dropped back near 50 for long, wages would spike back up, and the candidates would hit 80 again. It stabilizes in between, at 63.
With a bottleneck at X, and potential supply at Y, removing the bottleneck gets you a number between X and Y. All else equal, it can't stabilize below X. There will not 'eventually' be less doctors.
Alternatively don't even remove the bottleneck at first. Increase the residency bottleneck to 60. The number of potential doctors drops below 80, but it stays above 60, so now you have 60 doctors per year and the most money-motivated took a different major.
TL;DR: Let the number of residencies rise and the number of people that want to be doctors lower until they meet in the middle. Because residencies decide the actual number of doctors, meeting in the middle gives you more doctors.