I think it's a little silly to argue that purchasing decisions for a device are an endorsement of every single aspect of that device. There are features that are desirable on iOS that would be enough to influence a consumer to buy an iOS device that have nothing to do with whether or not the device supports sideloading.
But if we are arguing that purchasing decisions are an endorsement of every corporate decision about a device, then it seems silly to argue that voting decisions are not a similar endorsement of government policy. And of course, Apple is not legally obligated to serve the EU, they're one of richest companies on the entire planet so if anyone is equipped to be choosy about the markets they support, it's Apple. However, Apple has freely chosen to do business in the EU, and EU residents have freely chosen to vote for politicians that have imposed regulations on Apple's presence in the market.
Of course I don't actually think it's that simple. But ignoring the lock-in present in government policy and market participation is no less silly than ignoring the lock-in on in a device where moving away from the ecosystem can cause your credit card to stop working. A more reasonable take is that consumers make purchasing decisions for complicated reasons, some of them having nothing to do with lock-in (if they are even aware of lock-in or security or user freedom debates to begin with, which is usually not the case), and their preferences about these systems can change wildly depending on the circumstances and affordances and research that they do.
As an example, Facebook argued that users were clearly opting in to tracking on iOS by choosing to use the Facebook service instead of the many other available social networks they could sign up for. Thankfully, Apple didn't agree, and when users were offered a more clear choice about whether to share advertising IDs with Facebook, many of them said no. If we took a view that participation in an ecosystem was endorsement of the entire ecosystem, we'd be arguing that Apple adding privacy controls in front of Facebook was somehow circumventing the social-media market. But as it turns out many users did want privacy controls in front of Facebook, just not so much that they were willing to avoid Facebook entirely. When offered the best of both worlds, they were happy to use Facebook while sharing less information with the service.