The EU very skillfully and intentionally crafted the current Dutch Sandwich style scheme by essentially legislating tax heavens in various EU and quasi EU territories (the EU outermost territories make it a very fun map to look at).
The thought behind it was to both attract large companies to pay tax in the EU and allow EU multinationals to remain competitive without having to go somewhere else.
But a lot has changed the EU became less and less competitive and it didn’t really manage to bootstrap any new giants and lost a lot of its former ones.
The plan also did not account for companies like Google, Microsoft and Apple to exist with their market cap nor that companies would love nothing more than to sit on piles of cash that amount to the entire GDP of Europe when those laws were legislated.
Now with US companies actually repatriating cash the EU is basically looking for a new way to get some of that money back and more.