A prudent State recognizes such a thing works best with a light hand, of course.
Customers need not be un-informed on safety issues. There are many, many organizations that provide such information to consumers - think Consumer Reports, Ralph Nader and so on.
The "pure free market" ideal of caveat emptor makes businesses sound an awful like muggers loitering in dark alleys waiting for victims; something you need to protect yourself from. Sure, in a perfectly rational market and with perfectly informed participants these dangers are known and avoided, but perfection is never achieved in reality. Government regulation and licensing, when done properly, papers over the irrationality and information asymmetry by making the decision of what a business can do. After all, would any rational person eat at a restaurant that gave you food poisoning more often than not? If the government didn't force its closure lack of business would, and with more sick people too.
(In reality customers are never that well informed to make such a decision.)