Nations Don’t Gain or Lose from Trade, Individual Traders Do

In centuries past, when kings needed to accumulate gold and silver to pay mercenaries to fight their wars, they had a reason to accumulate such data and to promote policies (such as customs duties on imported goods) that would discourage imports, thereby keeping gold and silver from flowing out of the country in payment for the imports. This sort of “political arithmetic” eventually grew into the modern system of international balance of payments accounts.

Source