The U.S. trade deficit for goods shrank by about 4% in June from the month before, according to new data from the Census Bureau.Shrinking does not mean the deficit is by any means small; the U.S. still imported $101.5 billion more goods than it exported last month. This is despite a raft of tariffs — some old, some new — meant to bring that deficit down.American companies imported a lot earlier this year after the U.S. attacked Iran, according to Nationwide economist Oren Klachkin.“Any time we get hit with some kind of unexpected shock, companies’ first reaction basically is to go out and raise their, you know, stockpiles,” he said.In June, those companies were like, “we’re good,” which caused imports to fall and the trade deficit to narrow.Still, there are some U.S. industries that just can’t get enough imports. (Looking at you, tech sector, which needs computer chips from Asia.)“Spending on artificial intelligence continues to trend at a really solid pace,” Klachkin said. “This type of investment basically looks past the conflict and past tariffs and anything else.”The waves of tariffs have affected trade — specifically, who the U.S. is trading with, said UBS Chief U.S. Economist Jonathan Pingle.“You’ve certainly seen a dropoff in imports from China as the China tariffs were increased, and there have been beneficiaries in other parts of Asia, Southeast Asia,” he said.Even if American companies are looking to source more goods domestically, it takes a while to up and build a factory, said Nationwide’s Klachkin.“That type of investment is planned out over years. It goes through multiple layers of sign-off, right? So these things play out over a long period of time,” he said.Plus, a trade deficit isn’t necessarily a bad thing, said Ryan Monarch, an economics professor at Syracuse University. “If you have a trade deficit, another way of saying that is that your country is a place in which a lot of other countries really want to invest, where they want to put their money into,” he said.They give us stuff, we give them American dollars, and that’s a sign that they believe in the U.S. economy.