By Dan Gallagher

Microsoft's stores served their purpose at one point. But in the pandemic era, expensive showrooms become harder to justify.

The software giant announced Friday morning that it will permanently close all its existing retail locations. These have been closed since the coronavirus outbreak, but the company says enough sales have moved online, and enough of its product portfolio "has evolved to largely digital offerings," to justify a shift in its retail strategy. The closures will result in a pretax charge of $450 million for the quarter ending this month, and the company said all its retail employees will move to new sales, training and support jobs.

Microsoft opened its first store in 2009, in what seemed a rather blatant move to copy Apple's success with tony glass-and-wood boutiques in chic locations. And the move made some sense for a company that needed a way to showcase its own line of eye-catching devices, like Surface tablets. With free cash flow even then nearing $20 billion a year, Microsoft had plenty to play around with.

But retail never rose to the same level of impact for Microsoft, which is still predominantly an enterprise software business. The company currently has 83 stores compared with Apple's 571 locations. Brad Reback of Stifel Nicolaus estimates that Microsoft stores generated about $200 million in annual sales -- less than 1% of the $141.5 billion in revenue analysts project for the company for the fiscal year ending June 30. When Apple last disclosed its retail contribution in 2014, its stores accounted for about 12% of annual revenue.

Even such a low contribution to sales may have been worth it if Microsoft's stores helped raise awareness of its products -- in other words, marketing. But the pandemic has made retail exposure harder to justify for a company that doesn't need it. Storefronts designed specifically for letting customers handle glass and metal objects seem particularly unappealing now. With a solid business now established for products like Surface -- which generates $5.8 billion in sales a year -- Microsoft is better served letting retail partners like Best Buy handle the constant wipedowns.

Write to Dan Gallagher at dan.gallagher@wsj.com