It's not a part of the design or purpose. It's a part of the current status quo but the EU is a very different construct to the USA both legally and culturally.

The USA has the Constitution which at least in theory places hard limits on what the federal government can do, and the Constitution is strongly supported across US culture and society. The Supreme Court for example has recently started returning powers to the states.

The EU's equivalent is the treaties, which begin by saying the goal of the EU is "ever closer union". So the EU's stated goal at the very beginning of its foundational documents is to homogenize the continent's systems of government. Nothing in the EU's institutional philosophy or culture recognizes that it should be limited in scope and that countries should always have local control over some matters. For example the ECJ almost always rules in favor of more EU control, even when the treaties clearly say otherwise. Due to the widespread nature of this cultural mileu amongst the European political class, the EU routinely takes control of policy areas that it was never granted by treaty whilst facing minimal or no resistance.

For example, you talk about government-shopping by companies who set up their HQ in Ireland. The EU hates the possibility of government-shopping because it thinks the entire concept is illegitimate, so they have been attacking Ireland for years to try and force it to stop being so competitive. You can see that culture at work in the language they use:

https://www.europarl.europa.eu/RegData/etudes/ATAG/2022/7335...

"Ireland has been criticised for the way in which its tax system has been used by multinationals to set up aggressive tax planning structures and exploit mismatches and gaps in the international tax framework"

Low taxes are "aggressive" and a "mismatch" which gets "exploited". They think of a country competing against others using low taxes as some sort of hack that needs to be shut down, not a natural part of the competition between jurisdictions. In theory the EU has no control over corporation tax, but in practice the treaties let the EU regulate subsidies, so they redefined subsidy to not just mean direct payments from governments but also just charging lower taxes than France/Germany. And then told Ireland to change.

Now in practice the picture is complicated by the fact that the EU treaties do supposedly limit the EU's powers, because the people who signed them recognized the danger of the EU's unlimited ambition and sought to restrict it. And the US federal government has always grown, often working around or just ignoring the constitution in various ways. But this stuff is all downstream of culture. The Americans have the Republicans and its associated culture, which tries to decentralize government at least sometimes, in some ways. Even in cases like military spending where they don't reduce the size of the federal government they do try to spread it around, hence "porkbelly politics".

Mainland Europe doesn't have many similar parties or cultures. They're all very pro EU "integration" (read: passing control to Brussels). The UK had a smaller equivalent in the form of euroskepticism until they succeeded and Brexit rendered it irrelevant. And now Germany has something a bit like that in the form of the AfD, which despite being constantly smeared as Nazis has a relatively decentralized and conservative manifesto that wouldn't look out of place at a Republican convention. But you can tell how different the cultures are by the reaction: there's a very real and serious discussion in Germany about flat-out banning the AfD despite that it polls at about 20%. Nobody is talking about banning the Republicans.

So in practice I'd argue that the EU doesn't have the same design or purpose with respect to government-shopping as the USA does.