Because different nations have different natural resources and human capabilities, trade has become a popular method of allowing nations to get the products people need, such as when the United States exports goods like wheat and corn to Japan and imports goods like computers and cars from Japan. In this example, Japan and the U.S. engage in trade in order to sell the surplus of the things they make and gain access to the things they don't make, allowing for a balance of a wide range of goods rather than a surplus of just a few things.
This system allows countries to focus on a specific area of production in order to make the most efficient use of their resources while still getting more holistic needs met. For example, continuing from the example used above, Japan is able to focus on manufacturing, which allows it to make more efficient use of relatively scarce land, while the U.S. is able to use its vast land resources to produce crops that the Japanese might not have space to produce.
Trade also helps industries thrive within nations that may have a limited use for a certain industry's products. For example, Japan's auto manufacturing sector can thrive because it is able to provide cars to more people than just those who live in Japan.