So if I setup a company to do research and development in Spain, and spend $100 billion dollars creating a breakthrough technology, then I license my breakthrough technology to Americans for $1 billion dollars per year, America should be taxing my $1 billion per year in revenue as if it were 100% profit because I don't have any expenses in America?
Yeah. You already deduct your costs in Spain from your profits there. If you don't do any business in Spain, why are you there? The idea here is to discourage corporations from putting basing in tax havens where they don't do any business. Taxes are paid where the profit is made.
Maybe I am in Spain because I am a Spanish citizen? Maybe I want to do R&D there because that is where the expertise is that I need? Maybe I thought my tech was going to be much more successful in Spain when I set it all up, but found out that the market wasn't there but was in the US?
I don't deny that my idea will result in some degree of protectionism. I think that's worth it in this case in order to prevent the flight of profit to tax havens, but there are absolutely edge cases where it forms some barrier to free trade.
On the other hand, having pure profit in a foreign market without any costs there, doesn't sound like a terribile position to be in. And maybe local businesses could use a bit of an edge compared to multinationals.