Comparative Advantage
We live in a profoundly globalised world. This decentralisation leads to some non-intuitive outcomes. For example, South Africa exports steel to China, and imports finished cars back. At first glance this may seem wasteful. Why not produce cars in South Africa? How can a car shipped from China be cheaper than a car produced at the source?
This occurs because China is simply that good at producing cars cheaply. So good, in fact, that it displaces the cost of transporting cars great distances over sea. South Africa lacks the technology, expertise or the economies of scale to produce a car for the same price. This might seem like a undesirable arrangement for South Africa, but it is actually perfectly rational. This is called comparitive advantage. In the same way that people have unique talents and abilities, so do nations. Trade allows each country to exploit their advantages maximally, thereby minimizing the costs of goods. When two or more countries collaborate to produce finished goods, those goods are often cheaper than either country could produce individually.
We could imagine a hypothetical situation where one country is the most efficient at assembling hamburgers, but has relatively poor agriculture. Another country might send all the raw ingredients required for a hamburger to this country, only for it to be prepared and sent back as a finished product. As strange as this seems, at a certain price this setup makes the most sense for both countries.
Politicians can gain support by reversing this process and promising to move economic activities back to their own country. On some level this makes sense. A country might prioritize sovereignty over pure cost for key industries. However, this usually decreases the total value generated in the system. This drop in value may not be felt equally between the two countries, but the costs of goods often rise for both nations.