Well that is unfortunately a big part of the game. If you are big enough then you write your own rules. The classic excuse for the multi national companies is that they are creating jobs, so if the governments wants to tax them, then they would have to find an alternative. The governments therefore tends to give in.
In many welfare societies it is the tax money of the middle class that makes things run.