This is how every guild in history has operated. Every profession when it controls the supply of its own members seeks to limit it. The AMA can only furnish the weakest of excuses for this practice. They say it has to do with federal funding for residency programs. But there's no reason for residency programs to need federal funding at all. They generate more value for hospitals than they cost to run.