Amazon's focus has really been on faster shipping and same day, more on fulfillment. I am sure they will be working on product quality eventually, right now that is up to the user. They are also heavily pushing Alexa/Echo. They'll no doubt be first to drone delivery.
Amazon though makes most of their money from AWS, they found a way to reap ROI on R&D for their own supply/services chain. That is what really nailed it, this only came from an engineering focused research and development push that reinvested every dollar for a long time back into it, breaking all the rules of showing profits for a long time.
Walmart also is very good at supply chain and fulfillment. They have always been early to technology improvements there including pushing suppliers to EDIINT/AS2 and digital purchase orders and invoicing, up until 2003 everything in retail ordering was still really fax or e-mail orders. They were doing RFID in warehouses really early on. They got tons of improvements early on Target and other retailers moving on this early. Walmart Labs knows you have to reinvest in research and development.
Sears, without a competitor for a long time, and a lack of product/engineering driven leadership, got fat, happy and nappy, eventually was decades behind before they woke up.