The problem is not that the AMA was able to attack socialized healthcare, but that the AMA was able to dictate who would be able to practice medicine, what their education should be, how much they should charge and how they would organize.
Any american could go abroad to a country like say, Argentina, get free medical education and come back and treat patients without half a million dollars debt. But its illegal.