Accreditation of medical schools regulated how many doctors would graduate each year. Licensing similarly metered the number of practitioners and prohibited competitors, such as nurses and paramedics, from performing services they were perfectly capable of performing. Finally, prescription laws guaranteed that people would have to see a doctor to obtain medicines they had previously been able to get on their own. We have never recovered. In some states, doctors must send a copy of prescriptions for certain drugs to a government bureaucracy.
Government thus reserves the power to decide what is legitimate.
Some will say, things were simpler before 1914. Surely in our complex age, people cannot be expected to make those decisions for themselves. This is fallacious. Even the most extreme proponents of socialized medicine do not advocate compelling people to see a doctor against their will. The freedom to do without medical care, at least, is respected.