McDonald's (NYSE:MCD) has fixed its business. In its most-recent quarter, the fast-food giant saw comparable-store sales grow by 2.6% in the United States and 4% globally. The chain also posted a 12% increase in earnings per share, and its systemwide total sales were up by 5%.

The company has shown that it can manage its business through market changes. It has adapted to increased fast-casual competition in the U.S., and tweaked its menu as well as its value offerings to increase their appeal. CEO Steve Easterrbook explained what's working for his chain in his remarks during the chain's second-quarter earnings release.

"We remain focused on delivering the most enjoyable experience for every customer, every visit," he said. "Whether that is when they visit a modernized restaurant with inviting hospitality or through the convenience of having delicious food delivered to their home, we know that our fundamental day-to-day commitment to our customers is running great restaurants."

The exterior of a McDonald's

McDonald's has increased its U.S. same-store sales. Image source: McDonald's.

Why you should buy McDonald's

I personally don't own McDonald's because I'm not a big fan of the chain's food. Yes, they have excellent fries, and there are times when a 10-piece McNugget holds some appeal, but I generally elect to eat at higher end fast-casual chains.

However, one reason to buy McDonald's is that the company has learned that it should not be trying to win me over. Instead, it should focus on existing and lapsed customers -- people with a fondness for the chain who it might be able to win back or get more business from.

Easterbrook understands that adding fresh beef to some burgers, adding delivery and enhanced drive-through options, and adjusting its value deals will help bring back fans of the brand. He's focusing on core customers and winning more business from them, and that strategy appears to be working.

Still, while there are some strong reasons to buy shares in the company, some people are buying in for the wrong reason. Buy McDonald's if you believe in the company's core business proposition and Easterbrook's vision. Don't buy shares for any of the reasons below.

Automation will save money

Like many chains. McDonald's has added digital ordering options, and it has plans to greatly expand the use of kiosks in its stores. So far, these changes shift labor into customer-service roles. What they don't do is meaningfully reduce employment expenses.

It's possible that eventually McDonald's will automate some production. That could cut labor costs, but it comes with a very high cost -- so it's not likely that your burger and fries will be made by robots in the next few years.

Fast-casual is stumbling

Yes, some fast-casual chains have hit bumps in the road, and over-saturation has caused problems for others. But that alone won't help McDonald's. The company has always faced competition -- everything from food trucks to eating at home -- and its success depends upon its ability to appeal to its core customer, not what its rivals are doing.

Fast-casual will continue to undergo some shakeout. That said, a clear audience exists for higher-quality food, and while the winners may change, the category isn't going anywhere.

McDonald's has direct competitors, and those are its biggest concern. A Burger King promotion or limited-time offer is a much bigger threat to the company than the seven make-your-own pizza places opening and closing in any given neighborhood.

McCafe will bring in new customers

McDonald's has invested heavily in its McCafe coffee brand, and that has worked -- up to a point. The company now sells espresso-based beverages and frozen drinks to its core audience. That likely leads to bigger check sizes, and perhaps the occasional additional visit.

That's an incremental win for the chain, but it's hard to picture McCafe becoming more than that. Will a dedicated Starbucks or even Dunkin' Donuts fan change their habits? That seems very unlikely.

Buy for the right reasons

McDonald's has become a very well-managed company. Easterbrook has shown he has a deep understanding of the business and how to manage it for the long-term. That alone is reason enough to own shares.

After stumbling and struggling with its value offering, and to a lesser extent limited-time-offers, McDonald's has found its groove. Easterbrook can make incremental changes and tweaks to keep the company on track even in a challenging, changing market.