Let's face it: Folks need their cars, and cars don't care if there is a recession. AutoZone (AZO 1.05%) sells car parts to do-it-yourself customers and repair shops to quickly get cars back on the road in any economic climate.

Because of the recession-resistant nature of the business, the stock has performed admirably in past recessions and the current bear market. Here's why it could continue to outperform.

Singing in the rain

Record-setting inflation and fears of a global economic slowdown have gripped the stock market this year, but auto parts retailers like AutoZone have outperformed. Investors recognize AutoZone as a defensive company that can do well in any economic environment. Folks need their cars to get to work, school, or to pick up groceries, no matter the state of the economy. When your car breaks down, your life grinds to a halt, and you need to get it fixed as fast as possible.

Shopper looking at motor oil.

Image source: Getty Images.

Of course, some car owners will take their car to the repair shop, which AutoZone supplies, but the company mostly focuses on the do-it-yourself crowd. To attract these customers, AutoZone provides free services like battery and light checks and system diagnostics. It also rents tools to do-it-yourselfers for single projects. Many car drivers joined the do-it-yourself ranks during COVID stay-at-home orders in 2020 and should continue to visit AutoZone if there is a recession.

It stands to reason that, during recessionary periods, customers are looking to save money, like forgoing a car repair bill and doing repairs themselves. That is precisely what customers did during the Great Recession of 2008 and 2009. AutoZone reported sales growth of 5.7% in its fiscal year ending Aug. 30, 2008. During calendar year 2008, AutoZone stock was up 20%, while the S&P 500 was down 34%.

AutoZone grew its store count by 4% during 2009 to 4,417. In its latest quarterly earnings report, the company reported it opened 31 new stores, bringing its total store count to 6,846.

While many companies are pulling back based on inflation and global economic woes, AutoZone is forging ahead. During a recent call with investors, CEO Bill Rhodes said the company plans on opening 11 new distribution hubs next quarter. The hubs will allow the company to execute its plan to add more than 200 new stores in North America this fiscal year.

Now what?

While the S&P 500 stock index had cratered 21% this year based on the fear of a global recession, AutoZone stock has gained 6.3%. And though the U.S. has not yet officially been tagged with the recession label in 2022, AutoZone could continue outperforming the index if it happens.

In a vote of confidence in the business, AutoZone's board of directors authorized an additional $2 billion to its existing share repurchase plan. As inflation started dominating the headlines, the company repurchased 449,000 shares during its third fiscal quarter ending May 7.

If the possibility of a recession has you a bit panicky, AutoZone may be a great addition to your portfolio. And if no recession comes, the company will likely continue to grow in the long run.