Bernie Sanders wants to take “profit” out of health care.

It may surprise you to learn that for roughly 100 years, the American Medical Association agreed with him—but for a totally different reason.

The AMA was established in the middle of the 19th century with one overriding goal: to increase the incomes of physicians. For the first 50 years of its life, its main concern was medical licensing. In those days, anyone could hang out a shingle and claim to be a doctor. You didn’t have to have a medical degree. You didn’t have to have any training at all.

By the first decade of the 20th century, however, the AMA had succeeded in convincing virtually every state in the union to put an end to free entry into the practice of medicine. Going forward, if you wanted to be a doctor you had to have a license issued by government. Even today, the medical profession has the strictest licensing requirements of just about any profession or occupation in the economy.

Fresh off that achievement, the AMA set its sights much higher. As I explained in Regulation of Medical Care: Is the Price Too High? (Cato, 1980), the AMA’s broad object was to eliminate for-profit institutions from the medical marketplace. That included medical schools, hospitals, insurance companies and just about any other business that impacted the income of physicians.

Like a typical medieval guild, organized medicine understood that the surest way to keep practitioner incomes high is to restrict entry into the profession. Medical schools that had no purpose other than profit maximization, by contrast, had an incentive to train as many medical students as were willing to pay the tuition. By the end of the second decade of the 20th century, the for-profits were regulated out of existence. The non-profit schools that replaced them were heavily influenced by the AMA’s notions about how many physicians the country really needed.