People yearn to the be free and have self-determination instead of being controlled by a central or foreign power of "outsiders". Scots, Northern Ireland and IRA, Quebec and FLQ, al-Qaeda and ISIS, Pakastanis/Sikhs/Hindus/Bangladeshi, Shiites/Sunnis/Kurds, Jews, Palestinians, Hutu and Tutsi, and 1930's Germans and Italians.
The EU was designed to increase corporate profits. It's largely a neoliberal project, not a security pact. The US colonies and also Canadian provinces formed a country as a security pact. NATO was too busy fighting the USSR/commies to worry about each other.
The EU is security pact in that its intention is to prevent conflicts between its members. The 75 years since WW2 is the longest period in history without a conflict between European countries. It has NATO for outside aggressors.