Heading toward his inauguration in less than a month, President-elect Donald Trump has already waved a big stick at every American multinational company that’s even thinking about moving productive operations to another country. After making Carrier Co. an offer it couldn’t refuse, to keep 800 Indiana factory jobs from moving to Mexico, he warned that “companies are not going to leave the United States anymore without consequences.” In a barrage of subsequent tweets, he threatened “retribution,” including a 35 percent tariff on products those companies try to sell back to the United States.

Trump’s ultimatum scored well in national polls, but it should trouble all Americans who value free enterprise and the rule of law. It weakens our economy and our political system when the incoming chief executive of the federal government tries to dictate to U.S. companies how they should deploy their productive assets.

Related: Talk of Tariffs from Team Trump Makes Economists Very Nervous

According to a new report issued by the U.S. Commerce Department, more than 4,000 U.S. companies operate more than 32,000 affiliates around the world. Those companies don’t invest abroad primarily to take advantage of low wages or to send products back to the homeland, but to instead reach new customers and expand their market share globally. Locating production in foreign markets allows U.S. companies to better tailor products for local consumer tastes, to reduce transportation costs and to protect trademarks and intellectual property. Various services can’t be exported; they must be delivered in the local market.

In today’s global economy, U.S. companies sell more of their brand-name goods and services through their majority-owned foreign affiliates than they do by exporting from the United States. According to the most recent numbers from the Commerce Department’s Bureau of Economic Analysis, U.S. majority-owned affiliates supplied $4.49 trillion in goods to foreign customers in 2014, compared to the $1.63 trillion exported from the United States. U.S. affiliates supplied $1.66 trillion in services to foreigners, compared to $743 billion in exported services. That means U.S. companies sell more than twice as much in global markets through their foreign affiliates as they do by exporting from the United States.

What U.S. majority-owned affiliates produce abroad is overwhelmingly sold abroad. Of the more than $4 trillion in goods they supplied in 2014, 8 percent were sold as imports to the United States; 92 percent were sold in the host country or in third countries. A full 96 percent of the goods supplied by U.S.-owned affiliates in China were sold in that country or others outside the United States. In Mexico, 68 percent of the goods they supplied were sold in Mexico or other foreign countries.

Related: It Looks Like Trump Is Serious About Starting a Trade War With China

Ford Motor Co. has also come under Trump’s Twitter fire for its plans to shift production of lower-margin vehicles to Mexico. Its competitor General Motors now sells almost twice as many cars in China than it does in the United States, not by exporting to China but by producing them in China through joint ventures. Few of the cars are exported back to the United States. In 2015, GM’s China operations returned more than $2 billion in profits, improving the company’s long-term viability after its 2009 bankruptcy.

United Technologies Corp., the parent company of Carrier as well as Otis Elevators, operates 25 factories in China that generate $6 billion in annual sales and employ 24,000 workers. As Politico recently reported, United Technologies’ vice president for international government relations, David Manke, said of the company’s operations in China, “We’re not going anywhere. We like doing business there.” Manke said United’s joint ventures make products for the Chinese domestic market, not the U.S. market. “We don’t go there to make elevators and ship them back to the U.S. We go there to make elevators and sell them in China.”

While investment in Mexico and China draws the president-elect’s ire, most of the foreign affiliates are located in other high-income, high-standard countries, accounting for three quarters of the affiliate value added. What attracts U.S. investment is not primarily low wages but wealthy customers, skilled workers, free movement of goods and money across borders, the rule of law and political stability. U.S. majority-owned affiliates employ twice as many workers in Canada, Europe, Japan and Australia as they do in Mexico and China.

Related: Experts Warn of a Coming Fiscal Crisis as Trump Prepares to Take Charge

Expanding operations abroad not only generates profits but also supports U.S. employment at the parent company. More production abroad can increase demand for higher-end components and services exported from the United States. It creates demand for more U.S. engineers, designers, accountants and managers to support global operations. From 2009 through 2014, while U.S. multinationals were expanding their affiliate employment overseas by 3.0 million, they were adding 3.6 million jobs at their parent-company operations in the United States.

The irony of Trump’s fixation on outward manufacturing investment is that the United States remains the world’s largest recipient of manufacturing investment. Foreign multinationals, year after year, invest more than twice as much in the U.S. manufacturing sector as American manufacturing companies invest abroad. About one in six American manufacturing workers, more than 2.4 million, are employed by foreign-owned companies.

While candidate Trump was calling out Carrier for its plans to send 1,300 jobs to Mexico, the Japanese automaker Subaru was shifting production of its new Impreza model from Japan to its operations in Indiana, adding 1,400 new jobs in the past year. We should be grateful that Japan’s government is not threatening “retribution” against its companies that “ship jobs” to the United States.

Related: There Are Still Some Big Holes in Trump’s Plan for Economic Growth

If a Trump administration succeeds in erecting a financial Berlin Wall that prevents U.S. companies from investing abroad, the result will be a retreat from global markets, with European, Japanese and Chinese multinationals ready to grab market share. U.S. companies will sell fewer American-branded goods and services abroad, reducing the returns to their shareholders and employment opportunities for American workers.

Daniel Griswold is a senior research fellow and co-director of the Program on the American Economy and Globalization with the Mercatus Center at George Mason University.