Two of my favorite public companies have been touched by an E. coli contamination issue over the past few weeks. While I'm sure both will emerge unscathed in the long term, the contamination did have a material effect on Chipotle Mexican Grill's (CMG 2.23%) short-term share price. While the stock had already been well off its all-time highs, since the first news report about E. coli on Nov. 1, the stock has continued to get pummeled.

CMG Chart

CMG data by YCharts

In contrast, Costco Wholesale (COST 1.85%), which was linked to E. coli infections from chicken salad it sold, continues to trade right around its all-time high. A few weeks after the first report linking Costco with E. coli, the FDA concluded that there was no E. coli found in  salad samples in a few of the affected states. While the FDA is continuing to investigate, it appears as though investor faith in Costco has so far been justified.  

I find the specifics of these E. coli outbreaks to be far less interesting than what the investor response has been. What does this say about Costco? What company strengths can be gleaned from this situation?

Long history of fair dealing

Image Source: Costco.

Costco has one of the soundest management teams that I've come across in years of studying public companies. Founder and longtime CEO Jim Sinegal is legendary for his shrewdness as a retailer, commitment to all stakeholders, and role in cultivating one of the great company cultures in corporate America. The transition to current CEO Craig Jelinek was incredibly smooth (Sinegal remains on the board of directors), and little has changed in how well the company treats its workers, customers, and suppliers. When a Costco customer hears about something like the E. coli outbreak, the first thought will most likely be that the company is not at fault. In the unlikely scenario that it is at fault in some way, a prompt and sufficient response is expected.

Chipotle is also a beloved company, and after a few early hiccups in the wake of the recent cases of E. coli linked to its food released a "Comprehensive Food Safety Plan." Co-CEO Steve Ells released a letter saying, "From the beginning, all of our food safety programs have met or exceeded industry standards. But recent incidents ... have shown us that we need to do better, much better." He goes on to address what I believe to be the fundamental cause of the differing market responses to Costco and Chipotle's E. coli issues. "Our menu has remained virtually unchanged for the last 22 years and we only have 64 ingredients in our food." Chipotle appears to now be doing all the right things to move past this situation, but their business model allows for one bad ingredient or product to negatively affect the perception of the whole company.

Broad diversity of offerings
One of Chipotle's strokes of genius is its deeply limited and well-curated menu. It allows for rapid throughput, less customer confusion, and higher margins. However, it also makes it more likely that one tainted ingredient will affect a large percentage of customers due to the fact that there are only 64 ingredients present in the thousands of different food combinations that one can build. We saw the wide impact a situation with one ingredient can have across Chipotle earlier this year when the company endured a carnitas shortage to maintain its high standards in regards to the raising of the animals that make it to the menu. 

Carnitas. Image source: Chipotle.

Costco is toward the other end of the business spectrum in terms of number of items offered. While the company offers fewer SKUs than a competitor such as Wal-Mart, it still stocks over 3,500 distinct products. Customers go to Chipotle for one reason, and it's understandable that a news report that its food made people sick could scare some away. But even if a customer was convinced that the salad at Costco would make them very sick, they still might trek to the store to buy a television, diamond necklace, case of wine, pretzels, or basketball hoop. I would be surprised if many Costco customers who don't usually venture near the prepared-food section were even aware of the E. coli scare. This is the power of the company's product diversity.

The future is bright
Chipotle's next few months will be more trying than Costco's. Being a niche food seller with a reputation for making people sick is harder to recover from than being a retailer that happens to sell a broad offering of food, one of which may have caused illnesses. Chipotle's stock has fallen dramatically over the past three months while Costco's continues to reach near all-time highs.

CMG Chart

CMG data by YCharts

As investors, it's important to not get caught up in short-term histrionics. Chipotle may make less money over the next quarter or two or three because of fear and temporary store closings. Five or 10 years from now, this will be yet another blip on the radar for the business. The earnings should recover back to a trend line that reflects the overall quality of the business and not a few months in 2015. Costco has earned the benefit of the doubt from investors in part because of its tremendous nearly 30-year run as a public company. Chipotle is on a similar trajectory, and I look forward to holding shares in both of these businesses for the next 30 years or more.