It's been a lackluster three years for shareholders of The Home Depot (HD -0.36%). Whereas the S&P 500 is up 19%, Home Depot stock is only up 3%. Moreover, shares of Home Depot hit all-time highs in 2021 and are now down about 20% from their peak.

The lackluster three-year returns for Home Depot stock are in stark contrast to its life-changing 30-year returns. If you bought shares of Home Depot in April 1994, your investment is up more than 3,500%, turning a $10,000 investment into more than $360,000.

For much of the past 30 years, Home Depot was expanding its footprint. It's a mature business today, which means returns over the next 30 years will likely be much lower than in the past. However, here are three simple reasons this can still be a stock to buy and hold forever.

1. It's a forever category

Will artificial intelligence (AI) or cloud-based software still exist 50 years from now? It's possible, but it's hard to say for sure. Technological innovations have a way of creating possibilities that are impossible to imagine beforehand. In contrast, Home Depot does business in a forever category -- people always need a place to live.

According to the Census Bureau, the U.S. homeownership rate was almost 66% in 1980 -- in other words, homes were owner-occupied 66% of the time. In the fourth quarter of 2023, the homeownership rate was still a hair below 66% -- virtually unchanged in four decades.

Homeowners are likely to spend to maintain and improve their properties. This is Home Depot's market, and that's why I'm confident there will still be plenty of opportunity in this category throughout my lifetime.

2. Home Depot is hard to beat

While the home improvement space is a resilient category, Home Depot also has a resilient competitive edge over its rivals.

With around 2,300 locations, investors shouldn't overlook Home Depot's proximity to the customer as a source of strength -- only Lowe's comes close to matching its footprint. With this footprint, Home Depot management believes it has a 17% market share in North America. That's big as it is, but it's not so big that it's impossible to gain more share.

Part of Home Depot's secret is its business with professional customers. Management estimates that half of its sales are to pro customers. By winning over this clientele, the company has a form of recurring revenue. Homeowners may make infrequent purchases because they're only concerned about their one home, but pro customers constantly need home improvement products to do their job.

Home Depot dove deeper into its pro strategy by acquiring SRS Distribution in March for a little more than $18 billion. SRS Distribution will allow Home Depot to better address more verticals in the pro market, such as roofing. It could be a move that builds upon what's already a strength for the company.

In short, it's hard to compete against Home Depot because it has unmatched infrastructure for reaching both homeowners and pro customers.

3. Shareholder returns are a priority

Typically, Home Depot's management uses profits to buy back stock, but it won't be doing that for a couple of years while it pays down debt from its SRS Distribution acquisition. However, it will keep paying its dividend just as it has every quarter for 37 straight years (it hasn't necessarily increased its dividend every year during this time though).

As of this writing, Home Depot's dividend yields about 2.5%. And as the chart below shows, that's meaningfully better than its 10-year average, making now a good time to buy for dividend investors.

HD Dividend Yield Chart

Data by YCharts.

The chart also shows a healthy payout ratio for Home Depot. Companies can't sustainably pay out dividends if they don't have the money. In Home Depot's case, it's paying out a little more than half of its profits. Not only is this sustainable now, but modest improvements to earnings can lead to dividend increases in the future.

I'll reiterate that I don't expect explosive stock returns for Home Depot -- management is guiding for meager 1% top-line growth in 2024. And earnings won't get an added boost for a couple of years with share repurchases temporarily on hold. But I believe the company will compete well in an important industry for the foreseeable future, paying a growing dividend along the way.

That's good reason to buy and hold Home Depot stock in a portfolio forever.