This is an overly broad straw man argument because no one is trying to force Apple to give away iPhones. And yes, the government should be able to force you make major concessions, especially if your device becomes integral to the daily lives of half the citizens of said government.
Apple is selling these devices at a significant profit to end users. The primary purpose of the app store for Apple is to provide value to those consumers, so they continue to buy iPhones. Even if the EU decided tomorrow to confiscate all profits Apple makes from the app store in perpetuity Apple would continue to offer the App Store.