FORTUNE — Of all the numbers that have been thrown around regarding the $9.4 billion acquisition of Safeway (SWY) by Cerberus Capital Management, the private-equity company that owns rival grocery chain Albertson’s, one metric stands out: market share. After the merger, the combined companies’ share of the American grocery market will rise by 42%.
Safeway’s 1,335 stores racked up $36 billion in sales in 2013. Adding Albertson’s stores will create a company that’s almost on a level with the larger Kroger (KR), the leader among conventional supermarkets. But the combined companies’ market share post-merger will be just 5.4% (likely less since some stores will likely be divested to forestall antitrust action), and Wal-Mart’s share of the grocery business is nearly 30%, according to Euromonitor International. Kroger has 9.6% of the total market and $98 billion in 2013 sales.
Kroger and Safeway, though, are both facing the same set of challenges, not only, on one side, from Wal-Mart (WMT), Costco (COST), and other large discounters and warehouse stores, but also, on the other side, from natural grocers and specialty stores like Whole Foods (WFM) and Trader Joe’s. And it doesn’t end there: Changing shopping habits are sending more people to drugstores, dollar stores, and, increasingly, websites to buy their groceries. The traditional chain grocery store as we know it is over, and the remaining players must either adapt or die.
MORE: Undressing today’s man: Men’s fashion enters a renaissance
The need for transformation, which was brought into stark relief by the recession and its aftermath, is what spurred this merger. Safeway has been a poor performer, not doing enough to adapt to changing shopping habits or to alter its top-down management approach. This is reflected in its flat earnings in 2013, after a drop of more than 17% in 2012. The deal is valued at about 5.5 times the past year’s earnings before interest, taxes, depreciation, and amortization — just a little over half what similar deals command, according an analysis by Bloomberg News.
Albertson’s CEO Bob Miller told the Wall Street Journal that there are no plans to close any stores after the merger: “We intend on keeping the existing retail footprint of both companies,” he said. But to succeed, those feet will have to be shod in different shoes — Safeway needs to kick off its sensible loafers. The question is what to replace them with.
“Although supermarkets remain the majority force in food shopping, they are no longer calling the shots,” concluded a report last year by Packaged Facts. The shots are increasingly being called by consumers, who are looking for either lower prices or healthier choices — and, in either case, more variety.
As much as mid-market grocers like Safeway have to fend off competition from natural and specialty stores, the impact of Wal-Mart on the retail food industry should not be underestimated. Its share of the grocery market has risen from 4% just 16 years ago to nearly 30% today. Groceries now represent half of Wal-Mart’s revenues. A 2011 report on the grocery industry by the Treasury Department’s Community Development Financial Institutions Fund paints the picture: The top 10 grocery chains in the United States accounted for about 35% of the total number of stores, but about 68% of total industry revenues. The disparity there is almost entirely because of Wal-Mart, which is able to stock many more products in each of its huge stores than most of its competitors. (Costco is also a factor.)
MORE: Will millennials kill Costco?
Hence, there is consolidation and asset-shedding among traditional grocery chains. Putting Safeway and Albertson’s (and their many branded chains) together — and combining their procurement and distribution systems — won’t result in parity with Wal-Mart’s purchasing power, or allow the company to match Wal-Mart’s prices, but it will at least help it compete with Kroger for the middle market. Kroger will still be tops in that category, with more than 2,600 stores to Cerberus’s more than 2,400 under 16 different names, including Albertson’s, Von’s, Randall’s, and Jewel-Osco.
Kroger has moved more aggressively than Safeway in recent years to make needed changes. Its strategy has been to diversify as a way to fend off challenges from both the high and low ends. In January it completed its purchase of the Harris Teeter chain, giving it about 200 upscale stores and enlarging its presence in the southeast. At the same time, it deftly navigated the economic downturn by making its existing stores more value-oriented and by launching a rewards program to appeal to price-conscious shoppers.
Kroger’s decade’s worth of same-store sales growth continues unabated. That number grew by 4.3% in the fourth quarter of 2013, while Safeway’s same-store sales grew by just 1.6%.
Safeway has been a bit slower than Kroger to respond to a changing market. While it has made its stores more appealing in recent years by, among other things, adding more organic and fresh foods, industry observers say that hasn’t given local managers enough leeway to adapt to local consumers. And indeed there is a sameness about Safeway stores: One in the tony Oakland hills is pretty much the same as one in urban San Francisco. Its biggest recent strategic moves have involved shedding assets. Last year it announced it was pulling out of the Chicago market by closing all 72 of its Dominick’s stores. Many of the locations were sold to competitors, but the fact that the chain wasn’t salable as a whole is a sign of the challenges faced by conventional supermarkets. (Whole Foods purchased some of the stores.)
MORE: 5 alternatives to Amazon Prime
Last year, Safeway unloaded its Canadian operations in a $5.7 billion sale of 1,300 stores to Empire Co. Also last year, it spun off its Blackhawk Network Holdings (HAWK) gift-card business in a public offering. Though it retains 72% of Blackhawk, proceeds from the eventual sale of that stake are part of the Cerberus deal. And it is looking to shed its 49% stake in Casa Ley, a 185-store Mexican chain it has owned since 1981.
While there are worries that Cerberus will continue the slice-and-dice, perhaps cutting into Safeway’s core operations, those are mostly unfounded. Cerberus is generally known as an operator, not just a margin-focused financier, and taking Safeway out of public ownership will give it breathing room to take a slower, more strategic approach. The fact that Cerberus made a play for Harris Teeter before Kroger snapped it up is an indication that it wants to pursue a strategy similar to its bigger competitor: playing both ends of a rapidly splitting market.
Whether either company will succeed this way is still open to question. What’s beyond a doubt is that steering a middle course is bound to end in a tragic crash.