I am not sure if this is a good move on Apple's part in the long term, both parties, Republicans & Democrats, have shown a lot of ire for China. I don't think this will go unpunished. But perhaps they believe that the Chinese market is vastly more valuable than the US and are willing to eat any cost the US may levy against it in the future.
If I were them I'd have just moved it to Vietnam or India.