The news out of Detroit Monday offered a stark reminder that the fortunes of Wall Street and Main Street often move in opposite directions.

General Motors’ announcement that it planned to idle five manufacturing plants devastated working-class families in Michigan, Ohio, Maryland and Ontario. The company, calling the move a response to “changing market conditions,” said it would get rid of more than 6,000 production jobs and another 8,000 salaried positions.

But the single largest batch of job cuts by a U.S. automaker in 17 years wasn’t greeted as grim news by shareholders. Rather, it was cause for celebration.

GM’s stock price surged on the heels of the announcement, closing at 37.65, up nearly 5 percent on the day.

Call it a case of workers lose, investors win.

The maneuvers by GM amount to a major restructuring, and it’s still too soon to say what kind of long-term impact it will have on the company’s stock price. But investors obviously like what they see so far: the company moving to cut its labor costs to brace for lower car sales, even if it means putting thousands of workers on the unemployment line.

“The layoffs are the inevitable outcome of an economic model that views workers as disposable and shareholder excitement as indispensable,” said Scott Paul, president of the Alliance for American Manufacturing, a nonprofit that advocates for worker protections in the industry.

Plenty of analysts think the cuts should have come sooner.

Car sales have slowed in both China and the United States, two of GM’s most important markets. Meanwhile, the decision to idle the plants is part of a strategic shift away from cars and toward trucks and SUV’s ― Americans continue to buy big as gas prices remain relatively low ― as well as electric and self-driving vehicles. The company plans to kill the Chevy Volt, Cruze and Impala models, as well as the Cadillac CT6 and Buick LaCrosse.

The layoffs and buyouts will cost an estimated $2 billion, with many workers protected by union contracts through the United Auto Workers and the union Unifor in Canada. So far, investors clearly see that as a long-term investment worth making.

The UAW had a different take on the strategy. “We must step away from the anti-worker thinking of seeking simply the lowest labor cost on the planet,” Gary Jones, the union’s president, said Monday.

Jerry Dias, the president of Unifor, had even harsher words for GM. “We’re sick and tired of General Motors shipping all our jobs to Mexico,” he said at a press conference in Oshawa, Ontario. “They are not closing our damn plant without one hell of a fight.”