What tax advantage do they have? They pay the same taxes here as any other company that isn't multinational. What does it matter to domestic companies what taxes they are paying overseas? It isn't like Apple didn't pay taxes for the overseas profits... they did, they paid all of the taxes in the country that they sold the product in.
They are not shifting profits from the U.S. into overseas companies to lower taxes... that would put domestic companies at a disadvantage, but that is not happening.
Isn't that part of the issue, they actually didn't pay taxes on part of their income that was shifted to one subsidiary.
They were/are shifting profits from overseas into another overseas subsidiary that didn't pay taxes at all.
As to the legality of it all, well i think part of this hearing is to make the senate realize they need to make changed to the tax laws to reduce loopholes.