If you’ve ever driven to the East Coast on I-80, you’ve gone right past the General Motors plant in Lordstown, Ohio. Wave goodbye on your next trip. GM plans to close the facility next year, part of another big downsizing in which the company expects to cut about 14,000 jobs and shut down several factories.

The news is disappointing, but the logic is sound. GM needs to invest in its future, and that means focusing on electric and self-driving vehicles. Both are coming to a driveway near you — quicker than you think. What isn’t selling? Old-fashioned sedans. Well, that isn’t entirely true. Japanese automakers still sell lots of Camrys, Civics and the like, but GM and Ford make their money on pickup trucks, SUVs and crossovers.

It’s amazing how fast consumer preferences shift. Five years ago, passenger cars represented about half the U.S. market. Today it’s around 30 percent. Ford plans to stop selling most cars in North America in the next few years. Fiat Chrysler made a similar decision two years ago. As for GM, it will end production of the Chevrolet Cruze, Volt and Impala, along with several other passenger vehicles. Lordstown makes the Cruze, which makes the Lordstown plant dispensable.

Ideally, every American manufacturer is a powerhouse, but GM lost that status decades ago. The company was in danger of collapse during the Great Recession, accepted a government bailout and then retooled as a profit-focused entity rather than one obsessed with market share. GM CEO Mary Barra said she made the decision to revamp even though the company is profitable because waiting around to respond to a crisis means waiting too long. “The industry is changing very rapidly,” Barra said. “We think it’s appropriate to get in front of it while the business and the economy are strong.”

The person who doesn’t understand Barra’s thinking is President Donald Trump. He’s made a lot of promises about protecting and creating factory jobs in the U.S., and tossed in some threats as well. After pressing Barra to reconsider plant closings, he tweeted Tuesday that he’d consider cutting subsidies to GM for electric vehicles.

In a Wall Street Journal interview Monday, Trump said GM should stop making vehicles in China. “I think they forgot where they came from.” Not true. What GM and every competitive American company does is follow the customers. Believe it or not, last quarter General Motors sold more vehicles in China than in the United States. Making cars in America for export to China would render them “structurally unprofitable,” an industry analyst told the Journal.