The EU is not a government. It's a standard body for countries and their governments.
It seems like its operating as a government too me, but maybe I am not seeing the whole picture.
And this makes a lot of sense with rules about food safety, product standards etc. It almost makes sense for privacy protections. It makes very little sense for surveillance laws.
The government could also do this for the EU, it's called leaving the EU.