Amazon has more cash on hand. Walmart has more than twice the revenue.
And yet, walmart and others can't get their online shopping right. Sites are shit and cluttered and do a poor job of helping find the item you are looking for, let alone smartly suggesting other stuff you might want (to upsell you).
Amazon's site isn't exactly the greatest thing I've ever seen, but the algorithms for prioritizing long with associated items seems WAY better than many others...and with so much money I'm not sure how that continues to be the case. Amazon's tech is infinitely expandable beyond the store to all the other arenas they keep entering.
The future is hybrid web/store shopping. Walmart could make an online revamp and squeeze Amazon fast. I'm just so unimpressed with their online offerings right now. They still have customer Q&As at the bottom of the page even. They underestimate how important other buyers input is over the technical details that they prioritize at the top.