Yes, Walmart has a huge and efficient distribution system, but can they really leverage that for online sales? When stocking stores, they ship large quantities to each store. For online sales, it's small quantities of a much larger variety. You have to support the customer who is the only one in the area buying that item just as well as you do the customer who buys the most popular item. I doubt their distribution system can adapt to that model.
What you're missing with this line of thought is the proper comparison.
Walmart's huge and efficient distribution system, which you rightfully point out is efficient at moving large quantities, is not competition for the Amazon business model.
It is competition for the Amazon + UPS/USPS business model.
WalMart can leverage their back end to get products very close to customers very cheaply. They then simply need to solve the last (5) mile(s) problem. Amazon relies on external companies (UPS/USPS/FedEx) to do this and while they are creating same-day delivery infrastructure in-house in major metropolitan areas they have nowhere near the population coverage WalMart already has.