Over the last two decades, the way we go about getting our food in America has changed dramatically. To appreciate the full scope of this change, and what it means for both consumers and investors, it is a tale best told in two parts.

Part One
The first part of our story starts in 1978 in Austin, Texas. Back then, a college dropout named John Mackey joined forces with friends and investors to form what would eventually become Whole Foods Market (WFM).

Mackey grew up in the counterculture of the 1960s, thought that "corporations were essentially evil," and was a member of several food co-ops. But his time with the co-ops left him disillusioned and looking for alternatives:

Much more energy was focused on deciding which companies to boycott than on how to improve the quality of products and services for customers. I thought I could create a better store than any of the co-ops I belonged to, and decided to become an entrepreneur to prove it. 

Since this epiphany, Mackey has been able to tap into and lead one of the strongest and most persistent movements of the last century : a reworking of our relationship with the food we eat. Indeed, since 1998 (the furthest back that such numbers were tracked) sales of organic foods have increased at almost 17% per year.

Part Two
The second part starts around 1996. Leading up to that year, Wal-Mart (WMT -1.75%) had been experiencing double-digit revenue growth for as far back as investors could remember. But something was happening; that growth was slowing.

During the fourth quarter of 1995, the company posted revenue growth of 12.2% -- not bad by any means, but it was the slowest growth the company had posted during the past 10 years. Management began thinking of ways to continue driving traffic into the stores, and that's when a pivotal decision was made: Double down on the grocery business.

The thinking was pretty simple: Food was just a ploy to get more customers in Wal-Mart's doors. People would come to buy groceries, but while they were there, they would also purchase other goods. Wal-Mart could offer groceries for less because it would rely more heavily on increased merchandise sales for profit, while offering the groceries for razor-thin margins.

Back then, Wal-Mart accounted for just 4% of all grocery purchases in the United States. It had devoted 4 million square feet at its distribution centers to food items. But over the next decade, that number increased ninefold.

Source: MWPVL. DC = distribution center

Today, Wal-Mart devotes almost 35 million square feet at its distribution centers to food. And the proportion of nationwide grocery purchases made at Wal-Mart stores has exploded to a mind-boggling 25%. That's right: One out of every four food purchases in our country today happens inside of a Wal-Mart, and much of that has been at the expense of traditional grocers nationwide.

Where we sit now
By no means have traditional grocers been put out to pasture, but they are no longer the only big players. Here's a look at the top 10 publicly traded grocers by sales in 2012, as well as their total market share.

Company

Brand Name

2012 Sales (billions)

National Share

Wal-Mart

Wal-Mart

$274

25%

Kroger (KR -2.28%)

Kroger

$87

8%

Target (TGT -0.36%)

Target

$72

7%

Safeway 

Safeway

$38

3%

Ahold 

Giant

$26

2%

Delhaize 

Food Lion

$19

2%

Whole Foods

Whole Foods

$11

1%

SUPERVALU (SVU)

Save-A-Lot

$9

1%

Harris Teeter 

Harris Teeter

$5

0.5%

Roundy's 

Pick 'n Save

$4

0.5%

Source: Progressive Grocer. Market shares worked backward from Wal-Mart's 25% national share.

Since these two disparate movements started, others have joined in. Target has joined Wal-Mart in offering conventionally grown food for cheaper than other grocery stores can afford. Whole Foods has been joined by the likes of Trader Joe's (among others), which would have placed just behind Whole Foods in the list above if it were publicly traded.

And in the middle, many traditional grocers have been feeling the pinch. The "Whole Foods Clan" has taken away high-end shoppers who are looking for the healthiest options. And the "Wal-Mart Clan" has stolen away the bargain hunters who want the cheapest prices they can find on food.

In such an environment, a wave of sales and mergers has taken place. SUPERVALU was forced to sell some of its biggest brands (Albertson's and Jewel/Osco) because of declining sales and profitability issues. Safeway will be exiting the Chicago market, and is rumored to be a buyout candidate. And Harris Teeter has already agreed to be bought out by Kroger.

In reality, the only traditional grocer that's been able to survive this movement unscathed is Kroger. The grocer has been able to increase its presence and same-store sales during a time when many -- if not all -- of its peers could only dream of such results.

Value hounds might find profit in these traditional players, but long-term investors will be rewarded by taking these long-term trends into account when deciding where to invest their hard-earned cash.