Sonic benefited from falling gas prices and also consumers' enduring love for burgers and fries. Source: Mike Mozart, Flickr

This is not supposed to be happening. Drive-in restaurant operator Sonic (SONC) reported fiscal third quarter earnings this week -- revenue jumped over 8%, generating profits of $20.4 million, 22% higher than the year-ago quarter.

How can this be? Sonic lays on the fat with burgers, hotdogs, chicken sandwiches, fries, and shakes. There is hardly a healthy item on the menu (okay, they offer apple wedges).

But as we all know, or if we listen to McDonald's (MCD 0.47%), hungry customers are avoiding unhealthy food. They want fresh ingredients. They want wholesomeness. They want choice. McDonald's is in the midst of a major makeover to chase a mythical millennial consumer that will respond to the burger chain reborn as a fast-casual destination. Or, as CEO Steve Easterbrook says, a transformation into a "modern, progressive burger company."

Which is exactly why McDonald's is doomed.

Sonic seemingly has no problems giving consumers what they want, even if it doesn't come with the latest trendy ingredients. Source: Sonic

Just gimme the goodness
Sonic disdains the push to be something it is not and even revels in its classic offerings with funny, catchy commercials. The drive-in operator keeps its menu streamlined and simple, giving customers a handful of choices between burgers, chicken sandwiches, and hotdogs. By comparison, McDonald's tries to be all things to all people, offering dozens of options in each category, including eight wraps and 10 different salads. Sonic gives a nod to each of those too but without going overboard.

This is why Wendy's is not suffering the same malaise as McDonald's, even though it ought to be. Wendy's menu has 25% to 30% fewer items, and it is still able to report monthly comparable sales growth.

While McDonald's is busy blaming Chipotle Mexican Grill, Shake Shack, and The Habit for its declining sales and net restaurant closings this year -- the first time time in the company's history -- Sonic continues to enjoy greater growth.

SONC Revenue (TTM) Chart

SONC Revenue (TTM) data by YCharts

Keep growth on target
After coming out of the recession, Sonic has been on a diet of slow, steady growth, a pace that has begun to pick up in recent periods as it increases advertising and expansion. Of course, being a drive-in chain, it has also been helped by low gasoline prices this year.

During the 2014 fiscal year, which ended last August, Sonic opened 40 new drive-in restaurants. With 3,512 drive-ins operating at the end of the third quarter, it expects to open another 22 to 27 restaurants by the end of the fiscal year giving it around 75 new openings.

With a presence in 44 states (it will soon open its first restaurant in Rhode Island too, making it 45 states), it plans to increase the pace of store openings each year until it achieves 2% to 3% unit growth annually.

Knowing who your customer is
There is a market for fast-casual fare, but that is not, and should not, be McDonald's target demographic.

It rose to the top of the burger chain heap by providing fast food conveniently and inexpensively. It has wandered away from that in recent years by experimenting with its menu and rolling out frequent tests of new items. That is a source of frustration for McDonald's franchisees as they are the ones footing the bill for every new concept.

Right now, the franchisees are desperate, but they were hopeful when McDonald's said it would streamline the menu. Unfortunately, the chain only cut a few, slow moving items to then introduce a new sirloin burger. Other experiments like kiosks that allow for greater order customization are not only expensive to install but also threaten to slow down operations. Getting customers in and out quickly is a key facet of fast food.

... and who it's not
McDonald's problems are not a result of the rise of fast-casual chains. Sure, they have undoubtedly lost a few diners to the better-burger crowd, but McDonald's would do well to take a page from Sonic's playbook and get back to the basics. If the company returned to its roots -- giving customers good food quickly, cheaply, and conveniently -- it could reverse the trend it has been running up against.

NPD Group said over a quarter of the visits to quick-serve restaurants are driven solely by value offers. Unfortunately, the current management team still yearns for the burger palace to be something it is not, and that means McDonald's big turnaround hopes are ultimately destined to fail until it recognizes these fundamental issues.