the original impetus being to use trade to solve a political problem, but the original impetus was not federalism, although I imagine there were federalists around at the time.
at some point it became about free trade. and then there was a realisation that free trade between unequal economies was not sustainable. And similarly that consumer rights in a world where infrastructure and technology barriers had been removed, were also not sustainable via the protectionism that public ownership and state control provided.
There was then a need to control the excesses of free markets and the four freedoms in general, and the need to liberalise sectors that were not in the private space.
Hence the need for political union.