Shares of Costco (COST 0.17%) outperformed many of the company's peers in the past year. Shares declined by less than the market did in 2022 even though the retailer's business could be hurt by a recession. Sales growth was already slowing heading into the core holiday shopping period.

But there is a lot more to a Costco investment than simply judging the company as an everyday retailer. Let's look at three big factors that might not be obvious at a glance, but that make the company an attractive choice for smart investors.

1. Costco is not a traditional retailer

Costco's valuation doesn't make sense if you compare it to traditional retailers. Target (TGT -0.70%) stock is going for 0.7 times annual earnings right now compared to Costco's 0.9 times. The company even looks expensive compared to more successful retailers like Kroger (KR 0.94%), with its P/S ratio of 0.2.

But smart investors know that Costco isn't a retailer like these companies, which are highly susceptible to profit slumps when an economic slowdown hits. The company gets most of its profits from highly predictable subscription fees.

And the outlook for those fees is bright given that well over 90% of its shoppers regularly choose to renew their annual memberships. Think of the company as a club selling subscriptions rather than a retailer selling merchandise, and it becomes clearer why the stock receives its premium.

2. Cash returns come in bulk

Costco's dividend commitment looks meager at a glance. Its paltry 0.7% yield ranks it at the bottom of a list of retailing peers ranging from Target to Walmart (WMT 1.32%).

COST Dividend Yield Chart

COST dividend yield; data by YCharts.

Costco effectively pays a much bigger dividend, though. The company made a practice in recent years of giving excess cash to shareholders through a series of one-time special dividend payments, including a $10 per share bonanza in 2020.

The prospects for another special dividend are bright. Costco's earnings held up well through 2022, and the company is likely to raise its membership rate again sometime soon. The resulting earnings flow from that hike will give management more resources to direct toward growing the business, and toward sending more cash to shareholders.

3. It is worth the premium

It can be hard to consider paying a premium price for a retailer today, especially considering that a recession might be on the way that crimps spending on consumer discretionary products. Costco's smaller dividend commitment also provides less-stable income growth than you might get from owning a stock like Walmart.

But Costco routinely earns its premium valuation, mainly by finding ways to grow traffic and spending in its warehouses through a wide range of selling conditions. Shoppers flocked to its aisles in the early phases of the pandemic when they needed staple supplies.

Sales jumped even higher once incomes were lifted by the economic rebound and federal stimulus. And Costco was a popular destination again in late 2022 when shoppers were looking for ways to save money as inflation soared.

These successes suggest that the business has a valuable ability to cater to any consumer preferences at any time, in a way that can't be said for peers like Target. As a result, investors shouldn't be turned off by its higher valuation or a potential recession. There is still a lot to like about Costco stock here in early 2023.