The AMA represents doctors, not hospitals, and doctors benefit from scarcity. Hospitals benefit from residency grants, existing doctors do not.
>Do you have evidence of this lobbying?
Here is a source [1]
>Hospitals have no obligation to hire the residents they produce, so an optimal behavior would seem to be training many residents and not hiring them.
Optimal only if they can make money from the residents. Due to the bizarre natures of US medical reimbursement, resident physicians do not bill for their services [2]. While they may provide value in other ways, they are viewed as cost on the balance sheet. This is further complicated by the fact that hospitals dont want to bear this cost if they can get a grant, or simply hire a doctor away from another hospital. Getting rid of the grants would be a step in the right direction.
https://blog.petrieflom.law.harvard.edu/2022/03/15/ama-scope...
https://thesheriffofsodium.com/2022/02/04/how-much-are-resid....