A country’s people can foster their prosperity by participating in the extended, or international, system of specialization and exchange according to comparative advantage. If the people of country A want what the workers of country B can produce at comparatively low opportunity cost, they can get those products in two distinct ways. The first is to import freely (that is, without tariffs, quotas, or other costly obstructions) the products made by workers in country B. The second is, for some types of production, to import the workers from country B (that is, to permit unobstructed immigration) and set the migrant workers to work in domestic, country A firms. The two ways are broadly substitutes.
Recognizing these options, one is less likely to make the common mistake of attributing to high tariffs the rapid economic growth of the USA in the late nineteenth and early twentieth centuries. Yes, the people of this era suffered from high Republican tariffs, but they were compensated, as it were, by the government’s permitting mass immigration. Americans thereby imported the producers themselves rather than their (foreign-made) products. Later, after the mid-1930s, tariffs were lowered over the long run, which helped to compensate for the obstructions of free immigration that the government had put in place during the 1920s.
Ideally, of course, a country would permit both unobstructed importation of products and unobstructed immigration, letting market actors discover the best, least-cost ways of producing the most urgently desired goods: import the products or import the producers.