Most occupational licenses are about keeping competition at bay.
Want to cut hair, sell lemonade, or even walk you neighbor’s dog? Better get a license. You wouldn’t want the cops to show up at your door would you?
And it’s not just the time. There are huge (non-time) costs associated with becoming a hairdresser in many places. As in thousands of dollars.
However, there has been some progress on the licensing front recently. In Arizona a law was just passed that recognizes work licenses from other states. So if one is a barber in New Mexico and one moves to Tempe one doesn’t have to get a new (and expensive) license for Arizona anymore. This is a positive development.