How much licensing requirements are designed to “protect” the health of the public, and how much to restrict competition, may be gauged from the fact that giving medical advice free without a license is rarely a legal offense. Only the sale of medical advice requires a license.
Since outright grants of monopoly or quasi-monopoly would usually be considered baldly injurious to the public, governments have discovered a variety of methods of granting such privileges indirectly, as well as a variety of arguments to justify these measures.
We often hear that various government policies are justified because "the people want" this or "we want" that. This belief assumes that dissenting minorities don't matter at all. "We want" is usually nothing more than rank majoritarianism.
Business owners have always made errors, and external factors can lead to economic crises of various sorts. But the cyclical pattern of booms and busts we now see are a result of government interventions not seen in a free marketplace.
There is a myth that Progressive humanitarians agitated for meat-packing regulations which now protect us from disease. The reality is that the big meat packers themselves wanted regulation to help crush the competition.