What happened

Shopify (SHOP 1.11%) investors had a great week, with shares jumping 18% through Thursday trading compared to a 2.6% decline in the S&P 500. That result put the e-commerce platform stock up over 60% so far in 2023 while the wider market is up 6%, according to data provided by S&P Global Market Intelligence. The stock remains well below the highs it reached in late 2021.

This week's spike was powered by Shopify's Q1 earnings report, which included news of a strategic shift for the business.

So what

Shopify on Thursday reported generally strong sales and earnings results for the Q1 selling period that ended in late March. Revenue growth was slightly better than expected, and profitability also beat management's broader target for the year thanks to solid e-commerce demand on its platform.

Yet that good news was overshadowed by the company's decision to exit the logistics business. Shopify is selling that unit to Flexport and will maintain partial equity ownership in the business. The move will give management more resources to direct toward the core e-commerce platform, while potentially raising margins over time.

Now what

In a letter to employees, Shopify CEO Tobias Lütke acknowledged that the disruptive shift will remove roughly 20% of the company's workforce. "I ... did not make this decision lightly," Lütke explained.

Freeing itself from the costs and management requirements of logistics will open up other growth opportunities, though. Lütke singled out artificial intelligence as a major new tool that will allow for much-improved services for merchants over the next several years.

In the meantime, Shopify projected slightly better sales and profitability trends through the rest of 2023, consistent with its generally strong performance to start the year. That brightening short-term outlook, plus the potential for improving earnings trends over the next several years, drove shares higher over the last few days.