Walmart CEO Doug McMillon was on his way to lunch with his wife when he got the call. It was Saturday, Aug. 3, and it had already been a sad and tumultuous week at the company. A few days earlier, at a Walmart in Southaven, Miss., an associate—as Walmart calls its employees—had shot and killed the store manager and a department manager. Now, McMillon was told, a new crisis was unfolding: There was an active shooter in a Walmart store in El Paso.
McMillon immediately diverted his route to Walmart’s Bentonville, Ark., headquarters, and his wife dropped him off. He went straight to Walmart’s emergency operations center (EOC), where security, operations, and human resources teams were tracking the situation. The Southaven tragedy was still fresh in his mind. “But it didn’t take very long once I got into the EOC,” says McMillon, “to figure out this was a different kind of circumstance.”
This time the shooter was not an employee but a 21-year-old man who had reportedly driven some 10 hours to El Paso from his home near Dallas, intending to gun down people of Mexican descent. Using an AK-47 style assault weapon, the gunman killed 22 people and wounded another 24. Along with a second mass shooting that night in Dayton, the massacre kicked off a new national debate about gun violence—with Walmart in the middle of the conversation.
In the days following the shooting, Andrew Ross Sorkin of the New York Times wrote an open letter to McMillon calling on him to use the company’s influence and leverage, as it has in sustainability efforts over the years, to put pressure on the gun industry. And a 23-year-old associate in California launched a petition at Change.org to stop the sale of firearms at Walmart. At press time, the petition had garnered more than 73,000 signatures.
McMillon so far has resisted being drawn into the larger political and policy conversation. On the Tuesday after the shootings, he traveled to Texas to meet with the store’s managers and associates, “just to hug the people and listen to them,” he says. That same day, McMillon published his own open letter to Walmart’s associates, reflecting on the tragic nature of the shootings but saying that the company would focus for the time being on helping associates and customers in El Paso and working with law enforcement.
McMillon wrote that the company would be “thoughtful and deliberate in our responses.” Asked a few days later if he’s made any decisions about how to engage in the policy debate, McMillon says it’s still not the right time. “No doubt, there’s a spotlight on the company,” he says. “But I’m not ready to talk about that today.”
The questions aren’t likely to go away, as McMillon well knows. Grappling with complex sociopolitical issues is part of the burden and the responsibility of running the world’s largest company—one with a footprint the size of a not-so-small country. Walmart easily ranked No. 1 on this year’s Fortune Global 500 thanks to its $514 billion in revenue. And with 2.2 million associates globally—1.5 million in the U.S. alone—the company is the world’s biggest nongovernment employer.
McMillon, 52, has spent his entire career at the massive retailer. But when he stepped into the top job five and a half years ago—becoming just the fourth executive to lead Walmart after iconic founder Sam Walton—he found the company in a bit of a rut. Not only was Walmart trailing Amazon badly online, but also its core U.S. stores were struggling. McMillon concluded that he needed to invest in his workforce—to attract better-quality associates, boost retention, and by doing so ultimately improve the store experience.
It wasn’t a universally popular idea. After McMillon told Wall Street that he planned to increase wages for his legions of associates—McMillon says the company has invested $4.5 billion in the effort—Walmart’s stock tumbled. When I profiled McMillon for Fortune in 2015, his strategy hadn’t yet yielded results. The company had just reported its sixth straight quarter of negative or flat U.S. same-store sales. Last week, Walmart reported its 20th straight quarter of positive U.S. same-store sales growth. From its low point in November 2015 through mid-August, Walmart’s stock has soared 86%, vs. 43% for the S&P 500—a gain of $119 billion in market value.
Walmart is the only company to have been named to Fortune’s Change the World list in each of its five years. In the past, Walmart has earned its way onto the roster primarily for its leadership in driving sustainable business practices, in its own operations and throughout its supplier network. But this year Walmart makes it on the strength of the long-term investment in its people. That investment goes well beyond simple pay increases: The company has offered training courses to hundreds of thousands of associates through its Academies program.
Now Walmart is building on that foundation with its Live Better U initiative. Last year the company partnered with Guild Education to launch the program—the name comes from Walmart’s “Save Money, Live Better” slogan—allowing workers to pursue college degrees and skills certificates, debt-free, for $1 per day. Some 6,000 Walmart employees are already active and enrolled in school through the program, and another 4,000 are signed up to start this fall. Part of the idea is that they’ll have the skills and resilience to adapt as the economy evolves. “You’ve got to be able to manage change. You’ve got to be able to learn new tasks,” McMillon says. “Some people will go outside the company after receiving that training, and that’s okay with us.”
From McMillon’s perspective, Live Better U is part of a continuum—a long-term effort to make sure that Walmart continues to be a “learning” organization. That kind of learning builds resilience, both economic and emotional, that can prepare his workforce for whatever comes next.
A version of this article appears as part of the Change the World package in the September 2019 issue of Fortune.
More must-read stories from Fortune:
—Fortune Change the World 2019: See which companies made the list
—Q&A: Walmart CEO Doug McMillon on automation, the tragedy in El Paso, and more
—America’s CEOs seek a new purpose for the corporation
—Someday, Apple may make your new iPhone out of pieces of your old iPhone
—Change the World 2019: Companies to watch
Subscribe to Fortune’s CEO Daily newsletter for the latest business news and analysis.