Nations trade with each other because it is in each country's national self-interest to do so.
If nations specialize in the production of those products for which they are relatively more efficient, and export those products in exchange for imports produced relatively more efficiently in other countries, then all countries will have more goods and services to consume than if each country produced just for themselves. This occurs because each country will be using their nation's scarce resources more efficiently. Several different trade theories exist to explain and to predict international trade patterns. Specialization and trade along the lines of comparative advantage is mutually beneficial to all economies involved in trade because they are all able to consume a wider variety of higher quality lower priced products, than if they produced just for themselves. In addition, free trade is likely to generate dynamic gains.