In theory, if insurance companies would give out public indemnity insurance to unlicensed contractors then it would lower the risk for the government, assuming the coverage is broad enough. It also assumes that the cost of getting such public indemnity insurance is lower than getting a license, or contractors would just get the license instead.
https://www.myfloridalicense.com/CheckListDetail.asp?SID=&xa...
Of course, one can braid hair without the employees being exposed to toxic chemicals. Still, cosmetology is even today regarded as one of the more dangerous jobs in terms of toxic exposure, and many employees do get exposed to nail polish, hair dyes, and nail polish removers.
There is also a cultural aspect to it. The demographic that work as beauty salons tend to be young women. Politician that drive harsher regulation in this area want to gain votes by being perceived as the champion and protector of women.
I suspect that is not true.
The reason why Sweden has similar regulations comes down to relative simple reasons. The state want homeowners to have home insurance in case something bad happen that would result in the state/city having to step in and pay for it, such as a fire.
Insurance companies want lower risks (and might also be pressured by the state to have lower rates). They want everything that is covered by the home insurance to be installed by a licensed contractor, and in the case the contractor is at fault, they want them to have insurance against mistakes.
And thus the government create licensed tradespeople to facilitate the above. Unhooking a toilet is not hard, but home insurance covers water damage.
Sweden also has a lot of social safety nets so in the case that someones home get destroyed the city is required to help them. Requirements for home insurance moves some of that risk onto insurance companies.