The trade imbalance, like GDP, is a very crude economic measure. Do a search for “iPhone China trade imbalance” for more details. TL;DR is every iPhone is added to the trade deficit with China. However, China (Foxconn) just puts them together. The actual components come from all over the world. Then Apple sells them for 3x plus all the iCloud services. Samsung (Korea) makes more than Foxconn per iPhone.