It started as the European Coal and Steel Community. Actually, it was a good idea at the time.
Benelux was already underway in 1944. In 1944. A customs union designed to remove borders.
I supose there are various reasons that makes a government legitimate, one of them economic. No doubt a strong one in secular age.