Smith's specific example is somewhat dubious given the tendency of corporations to off shore work to cheap foreign locales or purchase from foreign suppliers. It actually winds up being governments and not individuals who acknowledge the necessities of protecting domestic industry from foreign competition. For market actors (individual consumers to big business) the short term price advantage winds up dominating the self interest calculus rather than consideration of potential long term ramifications of being dependent on foreign producers.
Regardless, this passage (if you expand it a bit) most concisely sums up one of the main themes of the book, which is why it's so often cited. The main takeaway here being that intentions don't always match outcomes. Governments often intend to improve society by intervention but make things worse. Free actors don't intend to improve society but often do so anyway (as an aside, despite this, Smith is actually LESS laissez faire than many expect).
Shortly after where your quote ends he makes this clear, "By pursuing his own interest he frequently promotes that of the society more effectually than when he really intends to promote it." This is reiterated in various ways as I recall and he's merely trying to apply it to this specific topic of importation here, though in hindsight what he considers the outcome of the self interest calculus is a bit wrong.
Still, market actors acting in their own self interest of foreign trade do indeed produce the unintended consequence of enriching those trading partners.