A related problem is that international stage is a market by itself. Nations compete for the business of large corporations. Which leads to creation of ridiculous tax exemptions and loopholes.
Countries can't have it both ways. You can't hate legal avoidance, while at the same time trying to steal tax revenue from your neighbour with similar tax incentives.