Why does the government create trade barriers?
If trade barriers hurt the average worker in an economy (due to lower wages), why does the government create trade barriers?
When a country imposes trade barriers, it’s either for the betterment or loss in exchange for something. In protectionism, countries just reshuffle jobs from different industries but do not create more jobs. In order to “save” jobs, countries will prioritize and specialize those industries that do have a comparative advantage to produce supposed higher revenue and by doing so, they would have to reduce wages to match productivity. However, this may include both gains to workers in certain jobs and industries and losses to others. Moreover, its restrictions to import will lead to higher-priced of goods for consumers as there will be fewer options to be offered and competition between other countries will be reduced as well as lowers the demand for a certain product. With this continuous lowering of sales, it will eventually greatly affect the labor employment as well as their wages. It will result in insufficient labor production as the industries will prefer more skilled workers over average workers to produce the products that they are best at or have specialized with. In addition, as there are no other emerging markets within the country and there is no competition between countries, thus, this lowers more the need for average workers. In a nutshell, workers who can produce more will be more desirable to employers, which will shift the demand for their labor out to the right, and increase wages in the labor market. By contrast, barriers to trade will reduce the average level of wages in an economy. Therefore, the government creates trade barriers even though it hurts the average worker is because they gain extra revenue from tariffs (which is a tax on imports) and on other supposed protections for their country. Trade barriers protect domestic products to be more competitive than imported products and make the latter less attractive to the consumers and reduce foreign competition. However, those benefits that the country is getting seem to be in favor of them than to its consumers. The supposed to be protection seems to have an anomaly on the process and thus the solutions they choose for the problems are only for the short run and do not benefit the consumers or workers but hurt them instead.
This is probably true for some countries or regions in the world. But for some, the most successful ones, one of the causes of their success are the trade barriers and tariffs that have been levied on cheap foreign products. There are other forms though, like imposing quality standards on products. So to say that in the long run all trade barriers as you call them (in fact they're protection mechanisms to protect domestic economies) are bad for consumers and prices is incorrect imho.