Forget churches, people are starting to get religious about their grocery store of choice. Growing up, my parents didn't give two thoughts to where they were buying their food—as long as the prices were reasonable.

Source: Janice Waltzer, via Wikimedia

Increasingly, that isn't the world we live in anymore.

Following countless studies on the importance of healthy eating, concerns about unsustainable practices that yield lower prices, and general wariness of GMOs, our relationship with food is fundamentally changing.

The onset of the latest round of earnings from the nation's largest grocers have made one thing crystal clear: if you stand for something—beyond just making a profit—you have a chance at winning over fans. Otherwise, you'll be closing up shop soon.

The trend-setters
Perhaps no two grocery stores are more symbolic of this maxim than Whole Foods Market (WFM) and Wal-Mart Stores(WMT -0.65%). At first blush, it might seem odd to lump these two together, but hear me out:

Wal-Mart is certainly more than just a grocery store, but the sale of food accounts for over half of the company's yearly revenue. Even more astounding: one out of every four dollars spent on food in America is used at a Wal-Mart.

That's incredible. But it's also emblematic of the fact that people know what Wal-Mart stands for: the lowest prices you can find just about anywhere.

On the other end of the spectrum is Whole Foods, the nation's largest grocer of natural and organic goods. The company definitely stands for something beyond simply making a profit: their values are posted in every store, and their founder/co-CEO John Mackey is the key figure in the conscious capitalism movement.

One look at how these stores have fared, in terms of their revenue, over the past five years show that customers are drawn to what's being offered.

Source: SEC filings. *Wal-Mart sales figures are for grocery section only.

Even though Wal-Mart appears to be doing far worse than Whole Foods, Wal-Mart's grocery segment has actually performed quite well, given that the company sells about 20 times more groceries than Whole Foods.

Newer Entrants
With the grocery industry in flux, a number of newer entrants (at least, to the public markets) have tried to capitalize on this burgeoning movement. The three most notable are Sprouts Farmers Markets (SFM 1.09%), Natural Grocers(NGVC 0.37%) and The Fresh Market (TFM).

But not all of these stores are necessarily created equal. Natural Grocers stands for something: the company was founded by Margaret and Philip Isely, who made a list of things they refused to sell because they were bad for human health. Free health educational classes are held at most store locations. And the international trade group Council for Responsible Nutrition is an offshoot of Margaret's efforts.

Sprouts also stands for something: much like Wal-Mart, the company is becoming the place to go if you want to find the cheapest organic products available. While this means margins are tinier, the company more than makes up for it with growth in the volume of products being sold.

But, as I've lamented many times before, The Fresh Market lacks the same kind of purpose often found at Whole Foods, Sprouts, and Natural Grocers. The company doesn't really stand for much, other than really high priced goods.

Looking at each company's growth rates over the past three quarters confirms that when it's clear to customers what a grocer stands for, they'll flock. Otherwise, it's much tougher to attract people to stores.

Source: SEC filings.

The old guard
There are a handful of hold-overs from the old-normal in grocery shopping: stores that had a plethora of goods that were reasonably priced, but didn't stand for much other than simply providing the basics—regardless of how good they were for your health.

Supervalu (SVU) sold  off many of its legacy grocery chains to Cerebrus Capital last year due to underperformance, and it looks like Safeway (NYSE: SWY) will be doing the exact same thing . And Midwestern-basded Roundy's (NYSE: RNDY) has had an awful showing since going public in early 2012. On average, the company has shown same-store sales shrinking by 2.7% per quarter.

Virtually the only legacy grocer to fare well in this environment has been Kroger (KR 0.56%). The company has been able to pair smart acquisitions with a broadening of product categories to remain relevant. In fact, it claims that it is now the second-largest seller of organic goods in the country.

What this means for you...
It remains to be seen if a mammoth like Kroger can continue to flourish in the current grocery environment, but the company has clearly done a good job staying relevant so far.

The overall takeaway, however, for investors should be clear: if you invest in a grocer, visit it. Does it stand for something beyond profits? Do customers have a clear reason—other than location—they frequent one store over another?

When it comes to buying stock in companies that you frequent, you have a huge advantage.  While Wall Street is busy figuring out what the return on equity will be if the new advertising campaign works, you can take the much broader view by visiting your Main Street grocery and seeing if it still understands its customers.

Over the long run, information like that will make the biggest difference to your investing returns.