Walmart online growth was directly cannibalized by AMZ for some time. Walmart stopped getting eaten, but the history stands.
As it stands, you have the poorest Americans (the long tail) competing against a small section of the rise who can afford and trust that shipping goods to their door. The overlap is minor, excepting for perishables.
Now. Maybe. But when Walmart was #1 they could have - and should have - never let Amazon and the like get a toe hold. Jeff ran up and over Walmart in less than a decade. It took Walmart well over a decade - and a few acquisition - to find their feet and sort it out.
David is so far ahead Walmart is looking in the mirror thinking they're ahead :)
Walmart is actually doing very well, especially in e-commerce.