You are right that the federal government isn't supposed to pass laws that override state laws, but they get around this all the time by attaching strings to federal funds. That's how we get bad policies like Common Core, Michelle Obama's school lunches, and Title IX kangaroo rape courts on college campuses. Yes ideally, we'd have completely free markets at the state level and limited interference by the Feds, but at this point I'll take any win for freedom I can get.
This article illustrates some of the costs on licensing in just one state, Nevada.
I agree with the general theme of that article about Nevada, but I'll repeat what I said before: that's Nevada's problem, not anyone else's. There's sometimes a fine line between a "licensed professional" and all the occupations like bricklayers, makeup artists, bus drivers, painters, manicurists and animal trainers that they cite in that article. Interestingly the article seems to be aimed more at the cost of those licensing requirements in Nevada rather than the licensing itself.