>Amazon historically (and still kinda does) have a problem with getting perishables logistically to last-mile delivery points, whereas Walmart and Sam's Club have already figured this out and done it for a very long time.
I don't think getting groceries to store shelves counts as "last mile." The entire problem with last mile is that instead of delivering a truckload singular location, one is many delivering tiny shipments to scattered, irregular locations, which is substantially more time, labor, and fuel expensive, not to mention logistically more difficult.