Wife is a doctor at a Miami suburb hospital (it's relatively well known), so I can tell you with confidence that the hospitals CAN absolutely pay $64K/year salary of residents on their own. It's just that they are cheap and do the bare minimum.
But yeah, AMA should stop requiring 8 years of education + 3 years of residency to become a garden-variety doctor. I can look up UpToDate, which most doctors and residents do, to diagnose and treat myself for most common illnesses IF I can purchase medication from pharmacy on my own.