Existing groups use licensing to shut out newcomers. They are largely anti-competitive, and anti-capitalistic.
The other is where unlicensed activities results in people dying. The outrage from such events often ends up with "license the people", so that Bad Things can't happen.
That's arguably a better approach, for mechanics, nuclear power technicians, etc. Perhaps even hairdressers, who work with toxic chemicals and need to know basic safety.
For me, the "health and safety" requirements make sense. Anything outside of that is typically anti-competitive, and likely rent-seeking.