It’s been two years since Amazon bought Whole Foods. At the time, analysts touted the deal as an Amazon initiative to dominate food retail. But is that what really happened?

Looking back and looking forward, what can we learn about Amazon’s goals and strategy? In short — it’s all about logistics.

First of all, it’s important to understand that the Amazon deal with Whole Foods is partly a real estate play. If you think about it, Amazon bought 465 stores, each of which controls close to 50,000 square feet of space in the ground, plus much more above ground. Imagine if Amazon decided to create a direct-to-consumer fleet in order to give you direct-to-consumer fulfillment from every single store? That’s exactly what some people think the ecommerce giant will do. And, in fact, this is one of Amazon’s biggest objectives.

Amazon-Whole Foods: a real estate play for last-mile

They are pursuing what’s called frictionless commerce. When you order an item, they want you to receive it as quickly as possible so that you can gain instant gratification. What if you could have a fleet of messengers ready to deliver your goods immediately using every Whole Foods store as a launching pad?

Number two, this deal supports cross-selling. Amazon wants to be able to cross sell whole foods and vice-versa. Already if you go to a Whole Foods today, you can buy Echo devices for $99.99 — a dramatic slashing of the price from $179.99. Amazon wants to use Whole Foods to sell more of their goods.

Whole Foods helps Amazon cross-sell new products

Third of all, the deal drives new solutions. When Amazon announced its entry into the prepared foods category, Blue Apron’s stock price was slashed. Imagine what happens now since Amazon can take advantage of the 465 stores and the huge kitchens that every Whole Foods represents. They could use those capabilities to provide a dramatic increase in growth for prepared foods.

Fourth, Whole Foods is about e-commerce fulfillment. Amazon is seeking to provide same-day, and in some cases, same-hour fulfillment. With 465 stores, Whole Foods has a footprint across the entire country. With a network of distribution centers, Whole Foods can give Amazon entry to every major market. Imagine if the next time you bought from Amazon, you got it in one hour, fulfilled directly from a Whole Foods location?

A fifth issue is robotics. What if Amazon decided to use its investment in automation to slice the labor costs in the food business? The food industry employs over 3 million people. With new labor-saving technology, could Amazon cut those costs and accelerate the speed at which they can deliver an order right to your doorstep?

Amazon can deploy robots in Whole Foods locations

And a sixth lever is reverse logistics, as pioneered by GENCO (now Fedex). It costs 10x as much money for products to go backward in the supply chain in comparison with forward. When you return a product, the company loses money. With 465 locations, can Amazon find a way to slash those distribution costs?

It’s worth noting that on the day Amazon announced the Whole Foods deal, their market value increased by approximately $14 billion. That’s almost identical to their purchase price. In essence, they bought Whole Foods for a net investment of zero!

As a result of these benefits, Amazon is gaining a powerful arsenal of supply chain capabilities. Whole Foods could catapult Amazon into the dominant position in logistics they are seeking. As the Wall Street Journal wrote, Amazon has “blanketed the U.S. with warehouses and package-sorting centers, flooded the streets with vans and taken to the sky.”

If you have any lingering doubt about Amazon’s intentions in logistics, ask FedEx CEO Fred Smith. FedEx stock plunged 13% after its Q3 earnings call, which included an explanation of a decline believed to be fueled by ending an Amazon contract. Smith included his former customer as a competitor, telling shareholders, “we basically compete in an ecosphere that’s got five entities in it. There’s UPS, there’s DHL, there’s the U.S. Postal Service, and now increasingly, there’s Amazon.”

In the end, it may be all about logistics, innovation, and the last mile.

Finally, this will be a catalyst for more new deals. Just a few days later, Target acquired Grand Junction, which was an ecommerce and last mile logistics company in which Cambridge Capital had invested. Target also bought Shipt, the delivery company that they have rolled out across their national network.

Why did they do it? Like every retailer today, with one eye on their business and the other eye on Amazon.

Going forward, we can expect to see Amazon continue to invest in building out its supply chain solutions. We will also see retailers like Walmart, Target and Home Depot investing to do the same. This is an arms race, and the buildup is only beginning.

Benjamin Gordon is an entrepreneur, advisor, and investor for companies in transportation, logistics, and supply chain technology. He is the CEO of Cambridge Capital and BGSA. Benjamin is a published author at Data Driven InvestorFortuneModern Distribution ManagementSupplyChainBrain,and CNBC. He hosts BGSA Supply Chain, the industry’s only CEO-level conference for all areas of the supply chain. Benjamin graduated from Harvard Business School and Yale College.

For more on the topic of Amazon-Whole Foods, see this SupplyChainBrain article.

Follow Ben at TwitterLinkedInFacebookMediumBehanceCrunchbaseSlidesharePinterestAbout.meYoutubeVimeoAngelQuora, his supply chain blog, and his personal blog.