I am going to point out that the premise of your question - that the AMA acts like a cartel and limits the number of medical schools and medical school positions - is inaccurate, and thus your question is unanswerable in it's current form.
I will attempt to provide you with background information on this matter as a non-US physician, who has an interest in medical history. Note, however, that my response here leaves the date range that could be considered historical in nature, and deals with active and ongoing current events.
Your use of the word cartel to describe the AMA suggests that you are reading some of the economic publications that were done on this topic in the 1940s to 1960s (ex: Kesel or Friedman), as I believe this is where the specific idea of referring to the AMA as a cartel began. Alternatively, you have read some other secondary or tertiary references that are influenced by this work.
You should be aware that these works were largely theoretical in nature, and not based on specific objective documented actions or policies of the AMA.
That being said, there was certainly the potential for a conflict of interest, given that the AMA was heavily involved in the LMCE, which is the licencing body for medical school (ex: this article from 1977 - https://www.washingtonpost.com/archive/politics/1977/05/21/review-of-authority-on-medical-schools-accreditation-urged/49c54760-f656-4d68-8937-e0984593116f/?noredirect=on).
While it is certainly possible that the AMA exerted influence to artificially limit training positions in the 1970s and earlier, the problem is the lack of objective evidence that this occured.
One point that has been used to support the existence of artificial limitation of medical school training positions (by "someone") was the high ratio of applicants to positions - some economists suggested that the presence of more applicants than training positions was evidence of artificial limitation of training positions.
More recent publications on health economics (ex: Handbook of Health Economics, 2011) however, point out that the high ratio of applicants to medical school positions is actually due to the cost of medical education being extremely subsidized, even in the US.
In the US, tuition fees make up only 3-4% of medical school revenues. This is because tuition costs are set below market value, in part to help encourage more applicants to apply and to avoid artificially restricting entry into the profession based solely on wealth. Was tuition to not be subsidized, the costs of tuition would be >10x higher than the $45,000/yr average it currently is, decreasing the number of applicants due to cost, and making the ratio of applicants to training positions closer to 1:1.
There were certainly documented efforts by the AMA to at least not significantly increase the number of physician training positions in the 1990s. However this was based off of research and economic modelling that suggested there was expected to be an over-supply of physicians in the near future (ex: https://jamanetwork.com/journals/jama/article-abstract/378581). Consider that given medical education is subsidized by things like government revenue, and hospital earnings, having too many medical school training positions would be expected to be a waste of both government and hospital money, and thus be harmful.
However, by the 2000s, it was realized that this prediction was inaccurate, and there would be a physician shortage. By 2006, the AAMC (who along with AMA are heavily involved in the LCME) was advocating for a 30% increase in training positions by 2015 (https://www.aamc.org/media/10006/download), which was supported by the AMA.
Finally, the rate-limited step in physician training is not medical school positions, but residency training positions. Residency training positions are largely funded by the federal government (https://www.fiercehealthcare.com/practices/more-medical-students-than-ever-but-more-residency-slots-needed-to-solve-physician) with the funding having been capped by the Balanced Budget Act of 1997. Legislation to increase federal funding (and thus the number of residency positions) was tabled in 2019 (https://www.congress.gov/bill/116th-congress/senate-bill/348) but essentially no progress has been made.
It should be noted that the AMA has been spending a significant amount of money to lobby the government to pass this piece of legislation (https://www.ama-assn.org/press-center/press-releases/ama-fund-graduate-medical-education-address-physician-shortages) - ie: the AMA is spending money to increase the number of physician training positions.
In summary: The AMA's indirect ability to potentially limit medical school training positions has drawn criticism and concerns over COI dating back over 60 years. While it is possible it took advantage of this historically, there is no objective evidence to support this. In addition, for the past 15 years, the AMA has actively supported increasing the number of physician training positions. Thus, your question is based on an inaccurate premise, and is unanswerable.
Wonderful question.
I'll agree with u/aedes that the AMA isn't an evil cartel who is all-powerful about the supply of physicians in the US. In a country as big as America there are many actors who determine how many doctors graduate. According to Dollard (cited in Kessel, 1958) the AMA hadn't (until then) exploited all of its monopoly power and generally acted in what it believed was the public interest.
Kessel (1958) is one such economist who very briefly tells how the AMA was founded in 1847 with the purpose of raising standards in medical education. This lead first to licensing and then to accreditation of medical schools. According to him, the so called Flexner report of 1910 convinced legislators of the importance of closing medical schools that didn't followed certain quality standards.
Kessel cites Bevan (1928, p.1176), the head of the AMA's council on medical education as saying " with the increase in preliminary requirements and greater length of course, and with the reduction of the number of medical schools from 160 to 80, there occurred a marked reduction in the number of medical students and medical graduates. We had anticipated this and felt that this was a desirable thing. We had an over-supply of poor mediocre practitioners."
In total, the number of medical schools declined from 162 schools in 1906 to 69 in 1944. (Kessel, 1958 citing Allen (1946) ).
Obviously now there are more medical schools, but the standards continue to be relatively more strict in America. For example, America doesn't accept residencies performed abroad, while other countries do.
According to Kessel the standards applied after the Flexner report are equivalent to keeping "all cars of a quality below Cadillacs, Chryslers, and Lincolns off the automobile market."
Now, raising the standards of medical practitioners is a noble goal, as is motor safety. But there is always risk in both, malpractice on the first and crash on the second.
The controversy over healthcare policy (Clinton's proposed healthcare bill to fulfill the 20 year requirement) shows that the health care costs are too damn high. Physician's availability aren't the only reason, but they're one reason.
...
Kessel, R. (1958). "Price Discrimination in Medicine". In The Journal of Law and Economics, Vol. 1. https://doi.org/10.1086/466540