If what they did is legal, so what?
Some of those companies haven't paid taxes anywhere for five years. Big companies will adopt the attitude that we're so big we can tie up litigation in the courts for decades. So screw you. The deductions probably aren't legal, but if they're too big to prosecute then what do they care?
And that's pretty much how they get away with it. What amazes me are the numbers of corporate apologists who stick up for behavior like that. If you did that you'd go to jail for five years. If Apple does it you come on here and post in their defense.