eBay (EBAY 0.66%) shareholders made out well in 2020. Yes, the stock didn't surge quite as high as e-commerce rival Amazon.com (AMZN 1.92%). But the online marketplace's returns were comfortably ahead of the broader market and beat other peers (as ranked by total online sales), such as Walmart (WMT -0.07%).

Let's take a look at why eBay had such a good year, and whether investors can expect a similar performance in 2021.

^SPX Chart

^SPX data by YCharts.

eBay's pandemic turnaround

Investors had no way of knowing this in January, but eBay's business -- which was struggling in early 2020 -- was about to get a massive boost when the pandemic restructured global shopping trends. Following a drop along with the rest of the market in March, shares began recovering quickly as Wall Street analysts bet on faster growth. It was an attractive turnaround idea at the time, especially as eBay shed underperforming segments and welcomed Jamie Iannone, a former Walmart executive, as its new CEO.

A young woman shops online.

Image source: Getty Images.

Iannone had good timing: Sales volumes soared during his first full quarter at eBay's helm. COVID-19 shopping changes created extra demand for e-commerce overall, but eBay's platform also attracted millions of new sellers, too.

That expansion rate held on through most of 2020, with volumes jumping 21% in fiscal 2020 Q3 compared to a 29% spike in Q2. eBay had been reporting modest sales declines before the pandemic struck.

Cash and profits help eBay rally

eBay's market-leading profit performance was another big factor behind the stock's rally in 2020. The company maintained its transaction fee level as sales soared. Its asset-light selling approach, meanwhile, allowed it to convert a huge percentage of revenue into free cash flow. While peers' operating margin held near 4% to 6%, eBay's profitability climbed back above 25% of sales.

EBAY Operating Margin (TTM) Chart

EBAY Operating Margin (TTM) data by YCharts.

That success supported gushing cash returns to shareholders, including over $800 million in Q3 alone, split between stock buybacks and dividend payments. But the better news is that eBay entered the holiday shopping season with solid growth momentum and plenty of resources it could use to protect its increasing market share.

Looking to eBay's 2021 potential

Iannone and his team see organic sales growth landing at roughly 20% for full-year 2020, and investors will judge that prediction against the actual results that are posted in late January. As for the new fiscal year, it's likely that volatile shopping trends, COVID-19 outbreaks, and a tough comparison with booming prior-year results will convince management to stay on the conservative side when they make annual projections at that time.

Yet the odds are good that eBay shareholders will have more to celebrate a year from now. Its platform has demonstrated that it is a valuable asset for sellers and buyers alike. The company's main challenge is to keep these parties engaged as commerce settles back down toward normal trends in 2021. eBay has some attractive new growth targets, too, including the massive refurbished and collectibles niches, advertising, and payments processing.

The biggest risk to owning the stock in 2021 is that sales will return to the disappointing rate that eBay posted in fiscal 2019. Still, a look at metrics like growth, cash returns, and engagement, and factors like its focused selling structure and new management team, reveals how different a business eBay is now versus before COVID-19. These assets are likely to keep paying dividends for investors who hold eBay stock through what could be another volatile selling year ahead.