Doesn't the AMA serve the medical industry? They don't have to make profits themselves. If a byzantine coding process raises medical treatment costs, they'll do it. Just like how they intentionally cap med school admissions to keep doctors in demand and inflate their salaries.
The AMA is functionally the trade union for doctors. They work to maximize the income of their members. Maintaining a shortage of doctors is one of their primary tools.
If this also helps the medical industry, it's an accidental side effect.
Any non-profit can always claim to inflate their expenditures up to (and above) their expenses and pay lavish bonuses to their employees, like you said.
Doesn't change what it basically is - aka Scamming the Public, and privatising the gains.
It can't pay out profits to shareholders, but it can hire its owners as employees and pay them any number of millions.