Amazon announced what is by far its largest acquisition ever today: a $13.7 billion deal to buy Whole Foods, the popular, pricey, and frequently organic grocery chain. That’s more than 10 times what Amazon paid for Zappos, its prior top acquisition, in 2009. It underscores just how seriously Amazon values its future role in the grocery business.

By purchasing Whole Foods, Amazon buys its way into a business it’s long been trying to crack, sets itself in a much stronger position for online grocery sales, and acquires 460-plus retail stores that can be used for an assortment of operational purchases, from holding delivery lockers to becoming distribution centers for food deliveries.

The grocery business is a more than $600 billion a year industry in the US alone. And the industry isn’t very concentrated. Aside from Walmart, which controls close to a fifth of all food and beverage sales according to figures assembled by Bloomberg, no other grocery chain has more than a tenth of the market. Only three others manage to grab more than 5 percent of total sales.

If Amazon is really going to be a top-five grocery seller, it needed to make this kind of acquisition

It’s long been a dream of tech companies to break into the grocery business, and there’s a similarly long list of tech companies that have failed in the process. But the tide may be turning in favor of grocery delivery services. A report earlier this year from the Food Marketing and Institute and Nielsen estimated that 20 percent of grocery purchases would be made online by 2025, representing $100 billion in sales.

Perhaps it’s no coincidence then that Bloomberg reported just a couple months ago that Amazon’s goal is to be one of the top five grocery sellers by 2025. If Amazon is going to do that, says L2 research director Cooper Smith, it needed to make some sort of big acquisition in this space.

“In order to get into the top five ranking, you need to do $30 billion a year in sales,” Smith said. “Whole Foods does about $14 to $15 billion a year in sales, so Amazon is halfway there through acquisition.” He also said it makes sense that Amazon would leave the Whole Food brand intact — since customers do associate Whole Foods with food, whereas Amazon has achieved minimal success with its “Fresh”-branded grocery business over the past decade.

Online sales could certainly be a large part of this whole deal: Amazon has name recognition in that, and has built warehouses and shipping infrastructure across the country. But that infrastructure hasn’t been optimized for groceries, and picking up Whole Foods is a quick method for Amazon to buy its way into a challenging skillset: managing inventory that, unlike the many gadgets and home goods Amazon sells, frequently expires or spoils.

$AMZN gained $15 billion in market cap since announcing $WFM acquisition so the deal is now paid for. https://t.co/gthcTyGM2P by @ranimolla — Edmund Lee (@edmundlee) June 16, 2017

Whole Foods was also a prime acquisition target. The chain is well liked and has locations throughout the US in major cities. It has also been struggling. Whole Foods has seen nearly two straight years of consecutive sales drops and projects a small recovery this year of only about 1 percent growth. As The Washington Post points out, a lot of its struggles are due to the fact that Whole Foods is no longer the only organic-friendly grocer around and is now being forced to compete with bigger, cheaper alternatives.

The stores are valuable as delivery hubs alone

That’s something Amazon can help with — and live with. Amazon has always focused on low-margins and expansion over huge profit growth. And lately, it’s put a focus on figuring out how to make retail stores more efficient. Amazon debuted a cashier-free convenience store last year (Walmart has said cutting down on checkout time could save tens of millions each year), and it’s expanding into algorithmically organized bookstores and grocery chains optimized for pickups and deliveries.

How Amazon took over the world. A relentless focus on the top line. pic.twitter.com/NqvWnqoj45 — Irrelevant Investor (@michaelbatnick) June 16, 2017

Not surprisingly, Amazon has claimed, according to the report in The New York Times, that it has no plans to apply its experimental cashier-less technology to Whole Foods stores an that “no job reductions are planned as part of the deal.”

L2’s Smith said that he doesn’t believe that Amazon’s high-tech grocery store ambitions will have an impact in the near term, but described the company as a “black box” that may not reveal its intentions until many years down the line.

“The technology inside of those [cashier-less] stores is the same technology Amazon has been testing in its bookstores. They’re not about selling books. They didn’t demolish Barnes & Noble and then open up brick-and-mortar stores to piss on their graves,” Smith said. “They opened up bookstores because they can test this technology and eventually apply it.”

A spokesperson for Amazon did not immediately respond to a Verge request for comments on or insights into the deal.

It’s more likely that, in the near term, Amazon is picking up these locations to build out its delivery infrastructure. Amazon Fresh, its home delivery service for fresh foods, is only available in select cities in about a dozen states. If Amazon can manage to transform current or future Whole Foods locations into combo grocery stores / delivery and pickup locations, it could rapidly expand Fresh’s footprint, opening up online ordering to more and more customers.

Amazon did not just buy Whole Foods grocery stores. It bought 431 upper-income, prime-location distribution nodes for everything it does. — Dennis K. Berman (@dkberman) June 16, 2017

In fact, the way to look at this acquisition may be more from the distribution standpoint than the grocery store standpoint. In a surprisingly prescient interview with Recode last month, NYU business school professor Scott Galloway said he believed Amazon would eventually buy a large retail chain. “I can’t imagine why they wouldn’t buy Whole Foods, for example, just because of the urban locations,” Galloway said. “They could close them down and just turn them into warehouses and I think they could justify the price.”

Keeping Whole Foods locations up and running should also make Amazon a more formidable competitor to Walmart and other top grocery chains. At first blush, their investors certainly seem to think so.

The day Amazon becomes a direct competitor to your company. pic.twitter.com/QP9KDWksSi — Bret Taylor (@btaylor) June 16, 2017

Walmart and Amazon have long been retail rivals, approaching sales from different ends of the spectrum: exclusively online for Amazon, and mostly in-store for Walmart. But both companies are rushing toward the center. Lately, the two companies have been locked in a free-shipping price war as Walmart tries to offer a more attractive option than Amazon Prime. (It currently provides free two-day shipping on purchases over $35.) And the early signs are that Walmart’s approach is working.

At the same time, Walmart’s latest acquisitions indicate that the company is looking to appeal to new customers through specific verticals — whether it’s Jet.com, Bonobos (which Walmart bought today for $310 million), or ModCloth. Amazon’s strategy is to finally tackle the thing that everybody needs: food. Whole Foods already has a profitable chain of hundreds of stores. If Amazon can keep that going, it’s in a fine position.

“Amazon is leveraging what others like Target and Walmart have already figured out: that grocery is one of the highest frequency purchase categories in retail,” Forrester analyst Brendan Witcher said, adding that this should be a red flag for Amazon competitors. “Once Amazon wins the high frequency purchase, they are likely to win other purchases — from blenders to lamps to shirts — due to convenience buying.”