Why was the European Union Established?

The European union was established for a number of different reason that there isn’t a consensus on. Some of these reasons include prosperity and security.