It's been a rough few months for McDonald's (MCD -0.43%) and its CEO Don Thompson. No matter what the company tries, it cannot reverse its declining U.S. sales numbers. For the month of May, McDonald's saw its U.S. same-store sales drop 1%. This marked the seventh consecutive month of disappointing same-store results.

Source: McDonald's, Bloomberg

While I give Thompson credit for trying to stem the losses, his predecessors deserve the blame for McDonald's current problems. Right now, McDonald's biggest problem is that it's losing sales to its competitors, most notably Chipotle Mexican Grill (CMG -0.71%) and Starbucks (SBUX 0.29%). No matter how hard the company tries, it cannot bring back those customers it lost to Chipotle and Starbucks. If we could go back in time, things would be much different for McDonald's today.

Source: McDonald's

What was McDonald's thinking?
Chipotle owes a good chunk of its success to McDonald's. After all, it was McDonald's that provided the capital to expand Chipotle from only 14 restaurants.

Back in 1998, McDonald's invested in Chipotle Mexican Grill with the hope of identifying new ways to reach customers and possibly providing its restaurant operators with a new franchising opportunity. McDonald's, at one point, owned 90% of Chipotle after investing about $360 million to expand the chain nationwide.

Source: Chipotle Mexican Grill

By 2005, Chipotle had expanded to 460 restaurants and was adding 100 restaurants a year. However, McDonald's decided to cash in on its investment and walk away with $1.5 billion to instead focus on its core business. I guess the growth was just too much for McDonald's executives to handle at the time.

While $1.5 billion is a lot of money to us, for McDonald's it's a drop in the bucket. Consider that the company plans to return $18 billion to $20 billion to its shareholders over the next three years in the form of dividends and share repurchases. This is more than 10 times what the company got from selling Chipotle.

If McDonald's would have held onto its 90% stake in Chipotle, it would have a stake valued at more than $15 billion, or about 15% of McDonald's current market value.

Source: Wikimedia Commons

Getting rid of Chipotle when McDonald's did was no doubt one of its biggest corporate blunders of all time. I'm sure Thompson wishes he had Chipotle now. It would certainly take the focus away from McDonald's weak U.S. same-store sales numbers. Chipotle's same-store sales rose by more than 13% in its first quarter.

McDonald's was late to the party
Starbucks CEO Howard Schultz purchased control of Starbucks back in 1987 with a group of investors when it was just a small Seattle coffee roaster and retailer. By the time the company went public in 1992, Schultz had grown the company from $1.3 million in sales to $73.5 million in sales and 140 stores.

Source: Forbes

The rest is, as they say, history. Starbucks now has more than 20,000 stores globally. Its current market cap is $55 billion compared to McDonald's market cap of $100 billion. Starbucks saw its U.S. same-store sales rise an impressive 6% and earnings per share increase 17% in its most recent quarter. This year, Starbucks plans to open 1,500 new stores across the globe.

Source: Starbucks

However, McDonald's didn't think coffee was a great business to be in until 2008. This is when the company decided to roll out its McCafes in a direct challenge to Starbucks. Over the years, McDonald's has added free Wi-Fi and lounge seating, similar to Starbucks.

How have Chipotle and Starbucks affected McDonald's?
McDonald's has felt the biggest impact from Starbucks in its morning breakfast business. Starbucks has been steadily increasing the number of food items on its menu to boost its sales.There are now eight premiere breakfast sandwiches available at Starbucks. Starbucks has also been adding menu items from La Boulange, which it purchased in 2012 for $100 million. The result is that Starbucks continues to blow away its competition in the quick-serve restaurant category.

Source: Adage

In terms of Chipotle, it has had a real impact on McDonald's lunch and dinner business. Its healthier fare appeals to many customers, and Chipotle has created a loyal following because of it. In fairness to McDonald's, though, even Chipotle founder Steve Ells did not foresee the impact his company would have on McDonald's. In 1998, he told the Chicago Tribune:

They are separate concepts, and we don't feel like we compete at all with McDonald's. We're a relatively small company but have a very strong operations system and a very loyal customer base. We have a great recipe for success.

Foolish final thoughts
McDonald's recent sales slump has been building for years. The market has changed dramatically over the past 20 years. Burgers and fries are no longer delivering the type of growth McDonald's experienced in the past. Growth is now found at Starbucks and Chipotle, which both have winning formulas and deliver products that customers can eat every day in a healthy manner.

McDonald's reliance on burgers and fries has cost the company and its shareholders dearly. For shareholders of McDonald's, growth is unlikely, and the focus in owning McDonald's is on its steady dividend and share buybacks. In a zero interest rate environment, McDonald's 3.2% dividend yield is still a solid play for investors.