Business men and trade-guilds that had done quite well for themselves in the past found it hard to make a profit, or even a living, once anyone could compete with them. In a free market, if a profit can be made in a certain occupation, new people will enter that occupation until competition for customers results in profit levels becoming unattractive. We call that ruinous competition.
Certain industries require quite a bit of capital to enter, so even back at the dawn of this new era, around the time of the American Revolution, profits could be made in those industries without the help of government restrictions on entering the business. Just as a beggar cannot enter the farming business without the price of at least a down-payment on a piece of land, so a laborer or small merchant would not have the capital to set up an iron-mill or buy a coal mine. So even under the growing free market system, larger enterprises had some shelter from ruinous competition.
The United States of America began as a sort of natural free-market area, and people generally benefited from that (neglecting here the use of slave labor and violent capture of Native American Indian real estate) for some time.
In the course of the 1800's, however, mainly at the level of individual states, those who did not want to be exposed to ruinous competition developed a strategy. Aside from the practice of the law, which was always limited by the government, it was argued that professions having a direct impact on the health and safety of the public needed to be vetted by the government. For instance, it was argued that not anyone could simply declare themselves to be a medical doctor. And again, there was some truth to it, although in the 1800's it appears that trained medical doctors were so ignorant of basic biology that many were just as dangerous to the public as the so called fake doctors, or charlatan (originally, sellers of Roman Catholic indulgences, but a term that came to be applied to untrained healers).
Allowing only doctors licensed under the authority of the government, and making sure there was always a shortage of such licensed doctors, would allow the group to charge more than the free market value of their medical services. In short, to overcharge the sick. This was the purpose of the American Medical Association, formed in 1847. The AMA did some good things, which don't concern us here. What they did on the economic front was require that medical practitioners be licensed (and they set up boards of their own members to decide who would qualify for a license) and they also licensed medical schools. In licensing such schools they carefully studied the demand for doctors and made sure that not enough doctors were graduated to meet the demand.
Now of course practically every profession, from cutters of hair to real estate agents to accountants and carpenters, requires a license. Some professions have not been as successful at keeping their numbers small and profits high as the doctors have done, but the general idea is there. Barriers to entry, no free market, no ruinous competition. Those who work without license are sucked dry by the fees of those who are licensed to work.
Those doctors who scream for free markets and against "socialist" government health care plans should take a good look at themselves and their ill-got millions. Because of the government preventing the operation of free markets in doctoring, in the 1950's and 1960's the term millionaire-doctor was synonymous with doctor.
If doctors don't want socialized medicine, we should open up doctoring to anyone who feels they can heal. Pharmacists should be able to make diagnoses and sell basic drugs without a doctor's prescription. For that matter doctors should be able to sell drugs in their offices, rather than having to write a prescription. People should be able to self-diagnose, if they wish to take that risk, and get any legal drug without a prescription.
If someone puts out a shingle and causes harm, they could be sued for malpractice. If they claim to have graduated from a medical school, but did not, they could be charged with fraud. If the government wants to certify people, or the AMA wants to identify their members, that is fine, but there should be no rule that you have to go to the AMA men or government men.
What do you say, Republicans and Tea-Party people? Are you really ready to give free markets a chance? I'm certainly ready to hang out a shingle, if the Republican run government is willing to let me. I'll start a medical insurance company too, a coop that benefits the members. That should put some pressure on Anthem et. al.
Note: many doctors have come out for Universal Health Care. For instance see Physicians for a National Health Care Program.