By now, everyone knows that McDonald's (MCD -0.30%) is having a tough year. Shifting consumer preferences toward healthier, better-sourced ingredients are taking a bite out of the U.S. business for McDonald's while being a boon for Chipotle Mexican Grill (CMG 0.19%). Abroad, McDonald's can't seem to get out of its own way. Despite massive potential for an extremely valuable brand, a food safety scandal in China caused emerging-market sales to collapse last quarter.

It seems that everywhere you look, there's one negative article after another about McDonald's, but it's also worth considering that McDonald's stock may be worth owning. For all its negatives, McDonald's still does one critical thing right: It returns a lot of cash to shareholders. This might seem insignificant given its lackluster share price performance, but the long-term benefits of the company's shareholder-friendliness pay off.

Here is why I own McDonald's stock, as well as what would make me sell the stock.

Start with the obvious
McDonald's sales are suffering in the United States because of a persistent shift in consumer eating habits within the fast-casual industry. For evidence, look no further than Chipotle's financial results, which are outstanding this year. Comparable-restaurant sales, which measure sales at locations open at least one year, soared 19.8% last quarter and are up 17% over the first nine months.

By comparison, same-restaurant sales at McDonald's fell 3.3% year over year in the most recent quarter because of declining traffic across all operating segments. It was widely understood that the company's performance in the U.S. has deteriorated this year, but McDonald's needed international growth to help pick up the slack. That hasn't happened, as total sales in the Asia-Pacific, Middle East, and Africa region fell 10% last quarter on a constant-currency basis.

Still, there is a good reason to continue owning McDonald's.

Dividend growth keeps me in the stock
McDonald's hasn't produced much in the way of capital gains over the past year, and I don't expect that to change in the near future. McDonald's stock trades for 17 times earnings and 16 times forward EPS estimates, which is no bargain considering its earnings aren't growing right now. What keeps me holding on is the dividend. The stock yields 3.5% at recent closing prices, which places it near the top of the dividend payers among the Dow Jones Industrial Average.

More importantly, McDonald's is a dividend growth stock as well. McDonald's has a long track record of increasing its payout, which is a critical piece of dividend investing. In fact, McDonald's has increased its dividend every year since its first payout in 1976, which amounts to 38 years in a row. However, its rate of dividend growth has declined in recent years, reflecting the company's struggles. After all, a company can only increase its dividend at high rates if it's producing the supporting earnings growth. The company's past two dividend increases were just 5%, after several years of double-digit percentage growth.

Still, a 5% increase is still well ahead of inflation. The fact that McDonald's can afford to raise its dividend at all during this difficult time is a testament to the business. Free cash flow is up 2.5% over the first nine months of the year, which is a credit to its strong brand and impressive cash flow generation.

Income investors should stick with McDonald's
The dividend growth at McDonald's is what keeps me from selling. With each passing year, my ownership stake in McDonald's will climb, as I reinvest my dividends, and the company is still creating value even though growth has disappointed badly this year. McDonald's is still growing free cash flow and has a stellar balance sheet and a world-class brand, all of which lead me to believe a recovery is within reach. McDonald's can reverse its declines in the U.S. with improvements in customer service. Internationally, the food safety scare should fade with time as the company works to restore its image with the public.

At this point, I would consider selling McDonald's only if the company went a full year without raising its dividend. That would break its remarkable streak of dividend growth, which management takes very seriously. Business would have to be extremely bad for that to happen. Until then, I'm content to reinvest the growing income stream I receive from owning McDonald's and patiently wait for better days ahead.