Abandoning the UK market would hurt Apple more than it would hurt the UK. They are not a nation-state, Apple cannot wage diplomacy by threatening the government, they can only shoot their own foot off and say it was for the good of everyone.
It would also partially validate the EU's regulation if they abandoned the UK but stayed in Europe. Apple very much doesn't want to feed either side a line.