I think there are some instances where U.S. security is threatened by rogue regimes, by foreign dictators, and there are some instances where liberating nations helps to restore our security.
Foreign trade is not a replacement for foreign aid, of course, but foreign aid to a country that doesn't also engage in significant amounts of foreign trade is more likely to end up in the pockets of dictators and cronies.