Shopify (SHOP -2.37%) is once again in investors' good graces. The e-commerce leader's stock price is already up more than 70% so far in 2023, as the market has begun to appreciate its exceptional long-term growth potential.

Yet fortune-building gains could still be ahead for investors who buy shares today. Here are three reasons Shopify's stock is still a great buy. 

1. The online retail growth story is far from over 

E-commerce sales exploded during the early stages of the pandemic when COVID-related restrictions forced many retailers to shutter their stores. Online retail sales then slowed once those safety measures were lifted and people returned to their traditional shopping locations. But investors shouldn't make the mistake of projecting the recent downturn in e-commerce growth too far into the future.

Retail trends are beginning to normalize. After experiencing some respite in recent years, brick-and-mortar retailers are once again being forced to close stores. Over 2,000 closures have already been announced in the U.S. alone so far in 2023. That figure could rise to more than 50,000 locations by the end of 2027, according to investment bank UBS

At the same time, online sales are expected to surge. Global retail e-commerce sales will top $8 trillion by 2026, up from $6.3 trillion in 2023, according to Statista. 

The e-commerce industry is projected to generate more than $8 trillion in annual revenue by 2026.

Image source: Statista.

These trends should help to fuel Shopify's growth. More merchants will be compelled to invest in their online operations, which could drive sales of Shopify's best-in-class e-commerce software sharply higher in the coming years.

2. A wise divestiture reduces the risks for investors

Better still, Shopify should emerge as a more focused enterprise following the sale of its logistics business to supply chain specialist Flexport. The move marked an about-face for Shopify, which had until recently listed the buildout of its fulfillment network as a key part of its expansion strategy.

Shopify purchased 6 River Systems for $450 million in 2019 and Deliverr for $2.1 billion in 2022. The warehouse solutions provider and last-mile delivery platform, respectively, were to form the foundation of Shopify's budding logistics network.

But the company announced on May 4 that some of those assets would be transferred to Flexport. In exchange, Shopify would receive a 13% stake in the fast-growing supply chain company. Combined with its existing holdings, Shopify will own a "high-teens percentage" of Flexport, according to chief financial officer Jeff Hoffmeister. 

The deal will allow the two companies to focus on what they do best. It will strengthen Flexport's logistics network, which will provide air and ocean freight services to Shopify's merchant customers. 

Shopify, in turn, will no longer need to spend billions of dollars to build out its fulfillment network -- a high-risk endeavor with an uncertain payoff, particularly since it put Shopify in more direct competition with e-commerce titan Amazon. With these risks now reduced, investors are likely to value the newly streamlined and more profitable Shopify much more highly.

3. Cost cuts could turbocharge free cash flow growth 

Shopify also cut about 20% of its workforce as part of the divestiture of its logistics operations and other cost-reduction efforts. Although painful in the short term, these cuts should further bolster Shopify's profit margins and cash flow.

Shopify's revenue jumped 25% year over year to $1.5 billion in the first quarter, driven by price hikes and an increase in sales made by merchants on its e-commerce platform. Shopify also produced $86 million in free cash flow (FCF), a significant improvement from the negative $41 million it generated in the prior-year period. Looking ahead, management expects the company to produce positive FCF for the rest of the year.

In the company's earnings release, president Harley Finkelstein said, "Shopify's strong first quarter results demonstrate once again that we're the go-to solution powering businesses of all sizes, on every surface where they sell." 

With its improved cost structure and refocused strategy, the leading provider of e-commerce software solutions is in a good position to generate rapidly growing FCF for its investors in the years ahead.