They're only moving their books offshore. It makes them more competitive because it allows them to lower prices, increase return on investment, or raise wages. That is purely logical.
Do you minimize your taxes, or do you just pay willy nilly extra when you don't have to? You see, minimizing your tax bill is not "treasonous", it's just stupid not to do so.
No company can stay in business if it doesn't take advantage of every opportunity to save costs. Why do you spite those who choose to keep their company alive? Dead companies pay zero tax and provide zero jobs.
US companies compete with foreign companies, obviously. But foreign companies don't have the cost of income taxes built into their goods as US goods have. This makes it impossible for US companies to compete. To stay alive, they MUST reduce costs where possible. It is legal and possible to minimize tax as these companies have done, so at least they're still in business providing US jobs!