Investments that companies make aren't an expense per se. It's almost always "capitalized" as an asset and can't be expensed, only expenses can.

But we are talking about investment in businesses by investors/owners. Imagine a successful US (California) company called Shmapple approaches you about funding a joint venture. You invest $10M for half of the shares in a subsidiary that will build a factory for a new product they've designed, they sell the resulting goods and split all profits with you.

So you ask, what will my share of the profits be? The company gives you very reasonable financial forecasts showing the factory should generate $3M a year in profit on average, grossing you $1.5M a year on your $10 million dollar investment, or 15%.

But wait, you say. I don't care about gross profits, only net profits after taxes. So you calculate it. First they have to pay California corporate income taxes (8.84%), about $260,000. Then they have to pay 35% federal corporate income taxes on what's left, or $1,180 more, leaving $1.78M (59%) left or $900k to you. But that's just the corporate level, you still haven't paid your taxes yet.

When the company pays you your share of the profits, you now owe income tax in your state, and dividend tax to the federal government. Lets say you also live in California, in the top bracket you average around 11%, or another $100k. And 20% for federal dividend tax, or another $160k. So you will net a little less than $640k, or a 6.5% after tax return on your investment.

But wait, it gets worse. Shmapple tells you that their business model is highly international. About 60% of the profits will actually be earned overseas, so they will also be forced to pay income taxes in every country products are sold in. So that's another 10% off the top. So you redo the math again, and now you only get $600,000 a year, or a 6% after tax profit (and you've lost $900k, or 60%, of your profits to taxes!).

So you say, hell no, I'm not funding that factory! I can make nearly that much risk free in treasury bonds, taking the huge risk on a new business for only an extra 1-2% a year would be colossally dumb.

So Schmapple says to you, okay, we've got a way to lower everyones taxes. Turns out we can defer the taxes on our foreign earnings if we don't bring them back to the U.S. We'll find a friendly country with an extremely low tax rate and deposit the profits there. And we'll wait for the US government to wake up and realize how awful their corporate tax system is, and pay the taxes then at a lower tax rate. In the mean time we can borrow against the foreign bank deposits and pay you dividends from that.

So you say, yea, even with all that hard work, my effective tax rate is still going to be close to 50%. You are just deferring, not avoiding, taxes, and when we pay them the future US corporate rate is still going to be pretty high, 20% or more.

So you make a counter-offer. Let's build the factory and incorporate the joint venture in Shmireland, a fair country across the sea. Sure the Shmirish might not be quite as good as workers as Californians are (maybe, maybe not, but they ain't much worse), but look at the tax savings.

Building in Schmireland means paying a 12.5% corporate income tax rate. Schmireland also doesn't tax world-wide income, just the income earned in Schmireland. We'll account for our profits being the same 60% rest of world (at an average 10% income tax rates), and 40% in Schmireland where we make the products. So our average tax rate is 11% TOTAL!. Now the net corporate profits are nearly $2.7M, and your share is $1.35M. After your California income and Federal dividend taxes, you will have around $960,000 left, or nearly 10% after tax. Now you tell Schmapple, do it in Schmireland and we have a deal!

This is what's happening in real life. If the U.S. tries to close it's "loopholes", say by no longer letting companies defer earnings in their foreign subsidiaries, they'll just make it even more attractive to invest overseas. It's already insanely more attractive now, how much do you think Samsung pays in taxes compared to Apple? It's Samnsungs biggest advantage!