There are many squishy goals the EU has, but its core and non-squishy task is to create and take care of a common market among all member states. That relates to boring and straightforward things like tariffs (just don’t have them, duh), but also to other trade barriers, like differing regulation between different member states. (If a French company can’t sell their wine picker without modification in Spain because of mutually exclusive regulation in the two countries then that’s a trade barrier and the EU aims to get rid of it by harmonising the regulation in France and Spain and all the other member countries.)
As such the EU also takes over the continuing duties of regulating companies from the member states. It is no surprise that much of what the EU does relates to regulation, since that is its reason to be.