It's not an option for Apple to leave any "major" country market, because they would get sued to hell for leaving that country. E.g. here in Germany (and probably in more EU countries, too) we have strong employee rights which prohibits "hire and fire" like in the U.S.
They would have to pay very high damages to all fired employees and also to the customers that already own Apple Devices, for being cut off the AppStore, rendering their devices useless unable to reinstall, setup, reactivate, reconfigure, and probably even damages for causing lost or negatively affected businesses.
Not even Apple have that much money left for paying damages and fines.
In addition Apple will lose fights in the U.S. too, leaving other countries will lead to nothing than less profit and more lawsuits. Leaving any country is also not an option, because Apple is being sued around the world, they would have to lift off to ApplePlanet to escape this, but they didn't show any ambitions to conquer the outer space yet.