Warren Buffett is regarded as the greatest capital allocator ever. His track record running Berkshire Hathaway has made him a legend. But he missed out on a massive winner.

It might not be a business operating at the cutting edge of artificial intelligence (AI), but Chipotle Mexican Grill (CMG 0.71%) has been a fantastic investment. In the past five years, its shares have skyrocketed 315%, a gain that crushes the Nasdaq Composite.

The Oracle of Omaha may or may not have ever had has his eye on this booming company. But here are three reasons he might love this top restaurant stock, and one obvious reason he might avoid it like the plague.

Building a strong brand

Look through Berkshire's holdings, and you'll notice companies with powerful brands. Apple, American Express, and Coca-Cola are top Buffett positions.

Chipotle might not be on quite the same level as those industry leaders, but one can't deny that the brand is well-known in the cutthroat restaurant sector. This business singlehandedly pioneered the fast-casual food category -- so much so that other restaurant concepts with different cuisines exist all over the country that are trying to emulate what Chipotle has accomplished. The company has roughly 3,500 stores, which adds to its wide reach and brand exposure.

According to Piper Sandler's Spring 2024 "Taking Stock With Teens" survey, Chipotle is the third-most-popular food brand among teenagers. That's up from No. 4 in the fall of 2023.

Putting the customer first

Businesses that prioritize their customers perform exceedingly well. Amazon, a small Berkshire holding, embodies this philosophy. I think Chipotle is a company that does this, too.

Over the past several years, the company has been focused on bolstering its digital and technological capabilities. Chipotle has a thriving rewards program that facilitates digital ordering. Online orders represented 36% of overall sales in Q4.

Moreover, the business is aggressively building new stores with Chipotlanes, which are drive-through locations. This increases accessibility and convenience for hungry customers -- a move that improves the user experience and reduces the friction to order more food. In other words, it's just easier.

Proven pricing power

Warren Buffett is known for having some fantastic observations over the years. One sticks out in particular in this situation. He once said:

The single-most important decision in evaluating a business is pricing power. If you've got the power to raise prices without losing business to a competitor, you've got a very good business.

This hasn't been more on display than in the past couple of years. With inflationary pressures negatively impacting the restaurant industry, Chipotle successfully raised its menu prices multiple times to offset higher input costs. However, revenue continues to rise at a double-digit clip, along with strong foot traffic. This is another trait that Buffett appreciates.

One reason to avoid: Excessive valuation

Despite the compelling reasons Chipotle is a great business that would pass the qualitative screen for Berkshire, investors can't ignore one variable that makes the stock one to avoid like the plague. I'm talking about the valuation.

The stock's remarkable performance, which has continued this year with a 29% gain through mid-April, represents investors' heightened optimism for this company. Of course, it helps that Chipotle keeps reporting quarterly financial results that beat estimates.

But shares are extremely expensive today. You can buy them at a price-to-earnings ratio of about 67, which is in nosebleed territory. It prices in so much bullishness about Chipotle's prospects. Even if you believe management can hit its target of 7,000 stores in North America over the long term, which I think it can, there's still zero margin of safety.

Warren Buffett will never overpay for a stock. While Chipotle might deserve a spot on his watch list, I don't see him buying the business anytime soon -- and you may not want to, either.