it has nothing to do with 'punishment' actually.
apple had a court decision to close every epic developer account after epic breached ToS long ago. they decided to do it now, after untrustworthy epic behaviour. it's akin of asking a customer to leave store.
epic are playing a victim card "oh we wanted to make an alternate store and apple banned us for that", it's a lie. There's already a beta alternate store and apple does nothing to prevent it from happening:
www.theverge.com/2024/2/29/24086792/setapp-subscription-only-ios-app-store
eu has nothing to do with it because apple is US company and developer account contracts are under US jurisdiction, be it swedish company or american. eu can't force company to deal with another company, right? or can they? who knows how far eu is willing to go, but if they do, it'll not be a free market anymore, it's freaking ussr, where PARTY tells you who you have to work with.
and for added context, chinese tencent owns 40% of epic games.