McCormick & Company's (MKC 1.11%) shares have been under pressure for some time as the company fends off competition. The company's stock has returned just 2.6% over the last year, including dividends, compared to the S&P 500's 22.4% total return. Second-quarter results, released at the end of June, show the spice-and-seasonings maker continues to struggle in the U.S. market. However, a key decision made by Wal-Mart (WMT 1.32%) shows why long-term shareholders should remain confident in McCormick's long-term earning power.

Poor U.S. performance
McCormick's second-quarter results reflect the ongoing struggles of its domestic business. Companywide earnings per share grew 8% in the quarter on 3% sales growth, thanks to a key foreign acquisition and a cost-cutting program that boosted results. Sales were flat excluding incremental sales from Wuhan Asia Pacific Condiments, which McCormick acquired in May 2013. However, North American consumer sales declined 4%, continuing a trend that began in 2013.

McCormick's cost-cutting program is expected to save $45 million in 2014 – 12% of last year's operating earnings. The savings initiative led to a six-basis-point improvement in second-quarter gross profit margin, which came in at 39.9%. Together with the international sales increase, the cost-cutting program increased operating income 5% in the quarter compared to the second quarter of 2013.

Still, McCormick needs to solve its problems in the U.S. market before its shareholders can rest easy. McCormick does not reveal what percentage of total sales come from the U.S., but it is believed to be a substantial percentage for the U.S.-based company. Products sold through grocery stores and other retail outlets account for 80% of operating income, while sales to food manufacturers and restaurants make up the balance. Wal-Mart is the company's largest grocery customer, accounting for 12% of total sales.

McCormick's U.S. grocery business is under pressure from a large number of small competitors, each with less than 2% market share. Its foodservice business is also experiencing weak demand from quick service restaurants. For most companies, these problems are simply realities of the competitive environment. McCormick, however, is different.

McCormick's spices have brand power.

Wal-Mart decision shines light on McCormick's competitive advantages
McCormick is the overwhelming leader in the fragmented spice-and-seasoning market. According to SymphonyIRI, McCormick accounted for nearly half of pepper and flavor-extract sales in the U.S. in 2012, and more than one-third of individual spice sales. The company owns nearly all of the household names in the spice and seasonings market, including Lawry's, Zatarain's, and Simply Asia. No other competitor comes close to matching McCormick's market share.

The benefits of owning the top brands became apparent during the 2009 recession, when Wal-Mart considered replacing McCormick's branded spices with private-label products. Facing increasing pressure from dollar stores, Wal-Mart was trying everything it could think of to lower prices – even if it meant eliminating well-regarded brand names.

However, after testing the concept in a limited number of stores, Wal-Mart opted to stick with McCormick's brands. Although higher priced than private-label products, spices and seasonings carry a low enough price point where paying 30% more for a brand name does not empty the pocketbook. For instance, McCormick ground ginger (8 oz) is listed on Wal-Mart's website for $3.18. If McCormick's ground ginger is priced 30% higher than the store brand, consumers pay just $0.73 more for McCormick. The difference evidently is not enough to deter Wal-Mart customers, so it is unlikely that other grocery customers are willing to trade down.

Long-term outlook is bright
Since McCormick owns the best brands and most consumers refuse to trade down to store brands, McCormick's long-term outlook is bright. Small North American competitors are making minor share gains, but none has the scale to disrupt McCormick's grip on the market.

Instead, product innovation and increased marketing should be enough to stop encroaching competitors from taking a greater share, especially since no competitor has the scale to match McCormick's spending in these areas. The company is boosting spending on advertising and expects a slew of new products to hit the market in the second half of 2014, indicating that the company is on the right track. Shareholders simply need to be patient as McCormick's strong brands lead to an eventual recovery in the U.S. market.