Rule: E=I. Value of Annual Exports=Value of Annual Imports. The net balance of trade of a country with the rest of the world, i.e. all other countries taken together, is always zero.
It follows that if you export more, you import more. Similarly, if you export less, you have to import less.
The only reason to export stuff outside your country is to buy other objects produced outside your country, i.e. to import stuff.
Some allowance must be made for credit and foreign currency accumulation-for Chile might export stuff and instead of exchanging them for other goods right away, maybe hold US dollar reserves, to buy something later in the US or in other countries. This is a small correction to the rule E=I, because dollar or foreign currency reserves are a small part of the net value of goods exported or imported-they are like the liquid cash any businessman holds to facilitate transactions.
Note that this is for a country with all the rest of the world taken together. However, Chile may run surpluses or deficits with any one country for a long period of time or forever, without this rule being violated. That's because countries are trading with each other, and surpluses with country A cancel out a deficit with country B.
Let us imagine a world with only three countries-Chile, USA and China. The numbers are just for example purposes, and are not real.
Chile exports 5 million dollars worth of Salmon to China.
Chile receives 15 million dollars worth of machinery and automobiles from China.
Therefore, against USA, Chile is always running a surplus in trade balance, because it is only exporting, but importing nothing from it.
But the surplus against USA must be exactly equal to the deficit against China, as you can see, to make sure that the net exports are the same in value as net imports for Chile.
There must be some form of trade between USA and China, where USA must be exporting something to China and running a surplus with China for exactly 10 million dollars.
An example might be
USA exports 500 million dollars of airplanes to China
USA imports 490 million dollars worth of computers from China
Taken all the data together, as shown in the figure above, makes every country's exports exactly equal to its imports.
Even if Chile is forever running a surplus against USA and a deficit against China, it all needs to add-up perfectly for it, where all exports come back as imports, directly or indirectly.
Note that in this example, USA always runs a surplus against China.
This example can be extended to 4, 5 and hundreds of countries, with similar results.
Hopefully you can see with this explanation that there's no fuss to be made about a country running a deficit with a particular country. It is just the nature of trade. For every surplus, there must be a deficit with a different country somewhere.
You can extend this concept to smaller divisions within a country (to States), to counties and ultimately to even to the individual level.
Therefore, Texas has a net trade balance of zero with the rest of the USA+other countries. What goes out of Texas, must come back into it, either from other States in the US or from other countries directly to Texas.
For an individual-what you produce, you must eventually exchange for what others produce. You eventually exchange what you produce with the what others produce.
My trade balance with Walmart is always negative-I only buy stuff from Walmart, but don't sell anything to it. Does that make me worse off? Not at all. If I was to profess equality of trade surplus and deficit with Walmart and each company separately, I would have to sell something to Apple, Walmart, Home Depot, and thousands of other companies I buy stuff from, individually making sure that I don't buy anything from these companies if I don't sell anything to them. What I do normally is sell my labor to some company, get dollars for it, and with these dollars, buy a load of stuff from Walmart, Apple, Home Depot, etc.
A couple of corrections need to be done to the rule for countries 1) when a country is loaned a large amount of money by foreign countries e.g Greece or Puerto Rico, whose governments were loaned large sums of money by foreign entities and 2) when a country has a good fraction of earnings coming from tourism e.g. Costa Rica. For these countries the annual exports will not be equal to the annual imports (exports will be smaller than imports), because a loan from a foreign entity or a tourist bringing in money are effectively an assignment to bring in additional imports. When an American tourist goes to Costa Rica and spends a few thousand dollars there, those dollars are in reality used by Costa Rica to buy imported goods. Same with loans to Greece by the German banks-the loans are in Euros, and Greeks will buy stuff using their Euros for their country, without having to export any goods. When the rule is skewed by foreign loans, as in the case of Greece and Puerto Rico, it is temporary, until the loan is paid off or the country defaults, as has happened with Greece and Puerto Rico. When it is by tourism, as for Costa Rica, Bahamas, Thailand, etc. the deviation from the rule, or the imbalance of exports and imports, is stable and can continue on forever.
Let's examine the case of a tourist country like Costa Rica in detail. The net imports of Costa Rica will be considerably more than the exports for Costa Rica.
The tourists who come to Costa Rica will sort of bring in their own consumption rights to the country-in the form of foreign currency bills, normally US dollars. It as as if these tourists saved up loads of things to be consumed in their home countries, but instead of consuming them there, they came to consume them in Costa Rica. This increases the importation of goods for Costa Rica, because these foreign tourists in Costa Rica have the right to bring goods from foreign countries, which they normally express by carrying US dollar bills.
If you have to troops to foreign lands-major countries like Russia, USA and France have a large number of troops outside their borders, they are indirectly fed and supplied by exports from the home country. What the French troops consume in Algeria needs to be exported out of France in some way.
Physics fans will realize that the Rule E=I is like the conservation of energy principle-energy can never be created or destroyed (except the corrections due to Einstein).
But the US always runs a deficit, and China always a surplus with all countries!
If you see recent data it seems that the US is running a constant trade deficit with the rest of the world for many years. On the other hand, China seems to be running a constant trade surplus with the rest of the world. This is a problem with incomplete or bad data- not everything which goes out of or comes into a country shows in the exports and imports numbers at customs. For example, Chinese have bought a lot of real estate in Canada, and that purchase must have been financed by something exported out of China (the goods exported from China have been exchanged with a house in Vancouver, BC, Canada). Chinese tourists are the biggest tourist group to Thailand-and are known to purchase massive quantities of goods in that country. That purchasing power also comes from what China has exported from its shores in some way. As explained above, these activities of Chinese citizens will not show in the customs declarations or the standard export and import numbers.
Trying to encourage domestic industries by restricting imports has the opposite effect, it actually discourages domestic industry overall
If you agree that this basic equality of exports and imports holds, it is easy to show that if you restrict imports in industry A to improve domestic industry in A, you must at some other place restrict the domestic industry B, which was producing B domestically, which was being exchanged for the imported product in industry A.
Before the restriction, imported industry A products must have been exchanged for something which went out of the country, products of industry B, for the trade equality to hold at that time. The moment you restrict imported industry A products, ostensibly to increase the production of industry A in the country, because you have restricted the total amount of A now coming into the country from foreign sources, you must be exporting less of some domestic products of industry B.
A reduction in importation, by encouraging a domestic producer, automatically results in a reduction in exportation, and the industries which were exporting will be hurt domestically.
A government must never restrict importation of industry A, and let the market take care of itself, because the skilled part of the country is the industry B, who by their great products and skillful exports were getting the imported products of industry A into the country. The country has built a comparative advantage in B, that's why it is able to sell those products outside the country, and you don't want to handicap your strongest player to support your weaker players, which is what happens when you restrict imports in a particular industry.
This article is very closely related to the article here about anti-dumping duties, restriction on imports because of bad trade balance numbers with a country, supporting domestic producers, etc.