"Walmart is not arrogant," CEO Doug McMillon said at CNBC's Evolve Summit in Los Angeles on Tuesday morning. "We could go away at any minute. I think most of us act that way every day. If you're not willing to fail — and we are failing at some things — you're going to go away."

Walmart is constantly evolving to avoid dying off, as plenty of other retailers have, according to the company's chief executive officer.

McMillon went on to say that, at Walmart, "everything is open to change."

In addition to keeping a photo on his phone that lists the top 10 retailers in the U.S. over the past few decades, the CEO said he keeps a copy of a specific Forbes magazine from the 1990s in his office. The cover story of that issue is titled, "Has Walmart lost its magic?"

"Retailers come and go," McMillon said. "It's really simple: If you're not meeting the wants and needs of the customer, you're done. There's not a lot of loyalty here."

When Walmart reported earnings last week, McMillon admitted the company still had work to do to boost its online business. The company says its grocery business is booming and it has made the most progress there. But it's still trying to grow a broader assortment of general merchandise online that will bring in greater profit margins and ultimately make that business a profitable one.

During Tuesday's panel at CNBC's Evolve Summit, McMillon also said Walmart's acquisition of Jet.com "hasn't worked out exactly like we thought it was going to work out." But it did cause Walmart.com to "accelerate," he said.

"I didn't understand how much of a digital transformation was needed [when I first started]," McMillon said. "That is still underway."