There is more to it than that. The trades are a huge protection racket, and the municipalities are in on it. Yes, there are aspects of specialized knowledge where an actual tradesman provides significant value - but a lot of the bureaucracy exists to favor the incumbents, not to necessarily ensure you are getting a better or safer product.
Insert the George Carlin quote about clubs here...
Insert the George Carlin quote about clubs here...