Quoting from this article:
"But many states require a license to legally perform a job where the risks of getting it wrong seem far less dire for potential consumers. For example, some states require that florists and make-up artists satisfy expensive and time-intensive requirements before they are legally permitted to perform their jobs. Also subject to such requirements in various states are locksmiths, ballroom dance instructors, hair braiders, manicurists, interior designers, and upholsterers.
This regulatory practice is known as “occupational licensing,” and it has spread to cover around 30 percent of the U.S. workforce, up from just 5 percent in the 1950s. "
That's just what I'm talking about - there is a net wealth gain making the USA as a whole richer by the transaction, but the gains are either spread over so many customers that the impact on any single one is negligible, or remain largely in the pockets of some large companies, while the losses hit those losing their job very hard. But still the net wealth gain is there, and systematically refusing such deals through protectionism will make the nation as a whole poorer in the long run. And particularly so if the industry in question is one in which intra-national competition is weak. On top of that, since protectionism pushes other nations to be protectionist as well, the business of American exporters is affected.
I don't pretend to have a clue about the details of the tax code. But next link :
"For tax year 2010, profitable Schedule M-3 filers actually paid U.S. federal income taxes amounting to 12.6 percent of the worldwide income that they reported in their financial statements (for those entities included in their tax returns). This tax rate is slightly lower than the 13.1 percent rate based on the current federal tax expenses that they reported in those financial statements; it is significantly lower than the 21 percent effective rate based on actual taxes and taxable income, which itself is well below the top statutory rate of 35 percent. The relatively low federal effective tax rate cannot be explained by income taxes paid to other countries. Even when foreign, state, and local corporate income taxes are included in the numerator, for tax year 2010, profitable Schedule M-3 filers actually paid income taxes amounting to 16.9 percent of their reported worldwide income."
Loopholes or not, the large companies tend to pay remarkably low taxes, lower than most small companies. Very possibly this is precisely what's supposed to happen, after they lobbied in a perfectly legal way to make that happen - but it's still not a good outcome economically. This is rent-seeking just like those absurd licensing practices above.