The role of business in society is changing. So are our motivations as we make decisions about why and where to work.

Bentonville, Arkansas

There are two basic ways to close the inequality gap in America, now among the widest in the developed world.

We can diminish the income of the highest-paid 1%—those whose households make roughly $1.4 million year—via progressive taxation and new rules giving shareholders more control over CEO pay.

Or we can lift the income for workers in the bottom 90%—those with an average household income of $34,000—through minimum wage increases, tax credits, and subsidies.

Then there’s a third way, one that calls for increasing the pay of the poorest workers without government intervention, but through the free market.

It requires corporate executives to forget the lessons of finance classes and set aside their preoccupation with quarterly earnings and short-term results. It means taking the view that happier employees who care more, quit less, and work harder will, in the long term, produce better returns.

It’s not a new strategy, but until now it’s mostly been confined to a few outliers, like Starbucks and Costco, easily dismissed as niche companies with unusually progressive leaders or business models that are hard to replicate.

But now there’s a new company lifting wages to improve its bottom line, and one that’s impossible to ignore.

For decades, Walmart has been among the most vilified corporations in America, if not the world, for its labor policies, its supply chain practices, and its impact on small-town merchants everywhere. Given the history, many of its critics were surprised in 2015 when Walmart pledged to give more than 1 million of its workers a raise. The news especially shocked Wall Street, where concern about the potential impact on earnings pounded the stock price—more than two years later, Walmart’s shares still haven’t recovered.

But CEO Doug McMillon draws a straight line from the decision to boost pay to the stark need to start countering the threat from Amazon, the online retailer poised to dismantle Walmart’s brick-and-mortar empire. In the process, McMillon’s insistence that better pay is smart business is potentially reshaping a national debate over income inequality.

We’re seeing Walmart’s impact on wages already

Walmart is the world’s biggest company by revenue, selling more stuff than Apple and General Motors, combined. With 1.5 million employees in the US (and 2.3 million globally) it’s the largest private employer in 19 states. Its enormous size warps the US economy, whether by driving vendors overseas to produce the cheaper goods it demands, steering consumers into strip malls and away from Main Street shops, or pushing down wages for retail workers across the industry as rival chains try to match its low prices.

But Walmart’s size isn’t only a malign force. The company also has used its massive buying power to eliminate waste in packaged goods and to drive down the cost of energy-efficient light bulbs, speeding their widespread adoption.

Raising wages can have an even bigger impact. Walmart employs one in 10 US retail workers, and one out of every 100 US private-sector employees. Just as the company forced competitors to hold the line on wages, increasing its pay is now pressuring rivals to match it.

In 2015, Walmart committed to spending $2.7 billion over two years on increased pay and better training. In April of that year, it raised starting pay for store workers, some of whom were making the federal minimum wage of $7.25, to at least $9 an hour, and bumped them up to $10 an hour the following year. Veteran employees also saw modest pay increases, and the company made sweeping changes in how vacation and sick pay were calculated.

Those wage increases can make a big difference in the lives of the working poor. For a full-time worker making $10 an hour, another $1 an hour means an extra $2,080 a year, or the equivalent of three months of transportation costs or five months of food for the average low income household, according to research from the Economic Policy Institute. It also means they’re less likely to rely on government assistance.

We can already see the effect of Walmart’s raise in national pay rates for cashiers, who are some of the lowest-paid workers in retail. According to US government statistics, hourly wages for cashiers ticked up noticeably nationwide in 2016. And while hikes in the minimum wage in a few states may have played a part, hourly pay for cashiers also climbed in states like Oklahoma, which didn’t raise its minimum wage, and is representative of the regions where Walmart has an outsized impact.

Last month, Target, among Walmart’s biggest competitors, announced it was raising its minimum wage to $11 an hour, up from $10, and would eventually lift them to $15 an hour by 2020. Target employs 323,000 and adds another 100,000 for the holiday season, who will also receive the higher pay.

“Once you start down this road, if you’re big enough, you’ll bring others with you,” says Thomas Kochan, a professor of work and employment relations at MIT’s Sloan School of Management.

In large swaths of the country where Walmart dominates, the company’s pay increase for low-earning workers is effectively raising the minimum wage.

Happier employees can produce higher profits

Without explicitly acknowledging it, Walmart came to the same conclusion Costco and Starbucks arrived at decades ago. Paying workers more, and providing them with substantial benefits like health care and parental leave, attracts more applicants, and gives employers more choices when hiring. It also reduces turnover, which leads to more experienced employees with a greater investment in the health of the business. All of that pays off in a better customer experience, the critical component in whether shoppers return or seek out competitors.

To the extent the philosophy of Starbucks and Costco—and a range of other employers from Trader Joe’s to QuickTrip—is organized into a theory, it’s called the Good Jobs Strategy, and its chief evangelist is Zeynep Ton, an adjunct associate professor, also at MIT’s Sloan School. At its heart, she says, the strategy is a business calculation: What’s the best way for companies to improve profits?

While Ton recognizes the societal benefits of paying higher wages—and employers like Starbucks capitalize on the positive publicity it generates—it’s primarily about making money. “Companies that follow the good jobs strategy don’t do it just to be altruistic,” she says in an interview with MIT’s news service. “They do it because they found it to be the most sustainable way to provide superior returns to their investors.”

Paying more for better performance is established wisdom among white-collar workers. Among technology, finance, and consulting companies, workers are regarded as an asset, and enormous energy is spent identifying, recruiting, and retaining them. Reed Hastings of Netflix strives to pay his employees at the top of the market, so he doesn’t have to worry about losing them. Firms like Deloitte and PwC are locked in an arms race to provide their employees with the most generous benefits.

But at retail chains, where margins are tight, store managers are trained to view labor not as a source of sales, but as a cost, Ton wrote in Harvard Business Review.

Ground-level employees in retail and food service may not have the levels of education and training to command high salaries. But they aren’t interchangeable parts, either—knowledgeable and friendly staff can make a big difference. When Bob Nardelli took over as CEO at Home Depot in 2000, he slashed payroll and increased the number of part-time employees, displacing the full-time workers who were home-improvement experts. Morale fell, customer experience suffered, and Home Depot’s share price plummeted. Nardelli resigned under pressure in 2007.

One of the keys to improving customer service and a huge benefit of higher pay, is lower employee turnover—something Costco figured out early. In a 2006 study comparing Costco with Sam’s Club, Walmart’s own discount-warehouse chain, Wayne Cascio, a business professor at the University of Colorado, noted that Costco’s annual employee turnover was unusually low at 17% compared to 44% at Sam’s Club.

The cost of turnover is usually calculated based on the wages of the employee being replaced. Even though Costco paid much higher wages —at the time, its employees were paid $17 an hour, 40% more than at Sam’s Club— Costco’s replacements costs were much lower. Cascio calculated that Costco spent only $244 million on replacement costs annually, compared to $612 million that Sam’s Club spent. That’s $5,274 per Sam’s Club employee, vs. $3,628 per Costco employee.

But the tenet that labor is a cost to be reduced—either through low wages, automation, or off-shoring—still holds sway in most business schools, and it’s what most executives believe, says MIT’s Kochan.

Changing that business philosophy is hard, and particularly so at Walmart, where low wages have been part of the company DNA from the start.

“It would take a major shift in business strategy and managerial beliefs, and that would be a bigger transformation,” Kochan says.

Walmart’s price rollbacks hurt retail industry wages

When Sam Walton opened his first Walmart in Rogers, Arkansas, in 1962, he created a business model based on underselling the competition. The only way it would work was with an obsessive focus on containing costs.

Executives had to share rooms on business trips, furniture in the headquarters was mismatched because the company repurposed samples, and vendors were required to provide toll-free numbers so the company wouldn’t have to pay for the phone calls. These folksy quirks helped make Walmart famous for its frugality.

But some cost controls had more impact than others. With labor one of the biggest line items for any retailer, keeping payroll as low as possible was an overriding focus.

Walmart’s penny-pinching powered it to become the world’s largest company by revenue in 2002, but cracks began to appear in its foundation after the recession of 2008-10. To expand the company’s profit margin, then-CEO Mike Duke simultaneously added new stores while reducing the workforce by 20,000 employees between 2008 and 2013.

Shelves went unstocked, check-out lines got longer, and stores looked disorderly and in disarray. Walmart fought back against reports that its stores were suffering, but acknowledged in employee meetings it was sacrificing $3 billion in annual sales because of out-of-stock items. Sales at stores open at least a year fell for nine straight quarters from 2009 through 2011.

Walmart executive were trapped in a cost-cutting spiral. They began slashing expenses as a quick fix, hoping sales would bounce back. “It becomes its own addiction,” says Paula Rosenblum, a retailing analyst with RSR Research in Miami. “They had cut payroll so lean that there wasn’t time to receive product and put it on the shelves,” she says. The restocking problems turned away yet more customers.

Walmart executives are loathe to criticize their predecessors, but in an interview, Judith McKenna, the chief operating officer for Walmart’s US stores, acknowledged things had gotten out of balance. “Maybe there were other things that took precedence,” she says.

In 2014, Duke stepped down after only five years, an unusually short stint for a Walmart CEO, dogged by the sluggish performance and a bribery scandal in Mexico. He was replaced by McMillon, a Walmart veteran of 24 years who nonetheless seemed to view the company with an outsider’s perspective.

AP Photo/April L. Brown Walmart CEO Doug McMillon.

McMillon, 50, describes Walmart’s hurdles as an “innovator’s dilemma,” citing a theory of Clayton Christensen—a favorite business guru of Silicon Valley—that describes how successful companies can be undermined by low-cost competitors.

One of his first acts as CEO was to give his executive team copies of The Everything Store, a biography of Amazon’s Jeff Bezos.

A more aggressive Walmart online

Amazon shoppers never have to confront empty shelves, chase down harried associates or confront surly cashiers. McMillon and his team theorized that to compete with the convenience of online shopping, Walmart had to improve the quality of service from its store employees.

By raising wages, Walmart was able to start hiring—and, critically, retain—better employees. Longer-tenured staff bred more knowledgeable and helpful customer service. Meanwhile, training on new technology for inventory management sped the flow of merchandise from trucks to the sales floor. That led to fewer empty shelves, a better customer experience, and ultimately more sales at the registers.

It’s no coincidence that as the stores stabilized, Walmart, after years of flailing online and posing no real threat to Amazon’s ascendance, began to unlock a successful internet strategy. It acquired e-commerce retailer Jet.com for $3 billion, bought a handful of specialty retailers like Bonobos, and refined its game plan for Walmart.com. Though still a small percentage of the retailer’s total sales, e-commerce revenue soared 60% in the second quarter.

It was improving brick-and-mortar sales that “gave us the ability to step on the gas” online, McMillon told analysts in June.

But Wall Street analysts tend to be unsympathetic to rising labor costs, whatever the reasoning. When American Airlines announced in April it was giving its pilots and flight attendants a raise—in part because it would result in better customer service and higher revenue, executives said—analysts balked and the airline’s shares fell 5%. “Labor is being paid first again,” Citi airlines analyst Kevin Crissey groused in a note to investors. “Shareholders get leftovers.”

Wall Street is not yet fully on board with Walmart’s strategy

When McMillon announced in 2015 that Walmart was raising its starting wages, he said it was critical to improve the customer experience and remain competitive. But the company warned investors the pay hike, and new investments in e-commerce, would weigh on profit, and it revised its annual earnings guidance down.

Shares fell 3% that day, and continued to slide over the following months as analysts panned the news and downgraded the stock. By the third quarter, fewer than one out of five Walmart analysts recommended buying the shares. Warren Buffett sold 7% of Berkshire Hathaway’s Walmart holdings. Jeff Reeves, a columnist at Marketwatch, recommended investors dump their Walmart shares, calling its strategy of investing in physical stores, instead of e-commerce, misguided. “When your current plan isn’t working, you need to adapt and evolve, and not dig into aging supercenters and hope for the best,” Reeves wrote.

Things only got worse that October, when the company said its fiscal-year sales would be flat, and earnings per share, the key barometer of a company’s profits, would fall as much as 12%, mostly due to the wage increases. The stock fell 10%, its biggest drop in 15 years, wiping $20 billion from Walmart’s market value.

Walmart didn’t give up talking about employee opportunity and advancement, though, no matter how unrealistic those concepts might seem to many workers. In its messaging, the company says that its low hourly wages are only a starting point, and that 75% of its managers began in their careers in hourly roles. As part of the wage increases, Walmart also introduced programs like employee education benefits, and more flexible scheduling.

When he announced the pay hike, McMillon, whose first job at Walmart was unloading trucks, talked about his career path and told employees “we want the same thing for you.”

It’s a big bet

With Amazon now going after the grocery business, where Walmart is king, the Arkansas retailer is under even more pressure to synthesize online and in-store shopping. As the proprietor of more than 5,000 stores, Walmart can’t have an internet-only strategy. Any future where Walmart is a leading retailer is one where Americans still shop at its stores.

The company is now offering customers in-store and curb-side pickup for merchandise and groceries, turning store employees into after-work delivery drivers, and taking advantage of its fleet of 6,000 trucks to cut out high-priced shippers like UPS and FedEx.

The bet on stores is a bet on its army of employees. Historically, Walmart could grow its sales by adding more stores to its empire, but in the US at least, the days of rapid store-count expansion are over. The company is now focused on boosting sales at individual stores, which means improving the shopping experience to attract more customers and have them spend more.

McKenna, the COO for the US, is one of the executives spearheading the effort. A brisk, no-nonsense native of Middleborough, in the north of England, McKenna, 51, is part of a new generation of Walmart executives with international experience, promoted by McMillon.“If we get our people agenda right, and our people are happier and more fulfilled in what they do, then actually the entire business, and the shareholders subsequently, will benefit from it,” she says.

The day I met her, she had spent the morning commanding the stage at the University of Arkansas’s 19,400-seat basketball arena, where Walmart held an employee rally, a yearly tradition tied to the company’s annual shareholders meeting. Wearing the Walmart regulation uniform of blue shirt and khakis, she exhorted an army of employees—associates, in Walmart parlance—from across the US: “Do you like winning? Me too!” The crowd roared its approval.

A more subdued McKenna sat down with me at an annex to a Walmart store in nearby Rogers, Arkansas, that had been converted into a training facility. As part of the company’s focus on training, 200 stores nationally will house a training academy like this one, each serving the employees of 20 stores.

Store workers promoted into management will spend two to six weeks learning Walmart’s carefully prescribed “One Best Way” for doing everything in a store, from stocking shelves to slicing meat to managing staff. The training exercises range from modeling with play-dough to donning virtual-reality kits mimicking the crush of a Black Friday crowd.

Upon completing the academy courses, new managers are feted with cap-and-gown ceremonies; for some, it’s the first time they’ve graduated anything.

New hires are given in-store training program program called Pathways, and once it’s completed, they get a dollar-per-hour raise. The training, along with the better pay and benefits, is intended to make Walmart’s workers feel more invested in the company and its success, although some complain that it takes months to complete. Employees are also being outfitted with mobile devices, with apps designed in-house, to help them track merchandise, freeing them from running back and forth from the sales floor to the backroom.

Walmart has only a few academies that have been open more than a year, so it says it’s too early to measure their impact on sales. Ultimately, the hope is the changes will increase employee retention and cut down on the turnover that forces Walmart to hire about 600,000 new employees every year, McKenna says. “The more confident the associates are in doing their job, the more fulfillment they get, the more likely they are to stay with you,” she says.

Of course, Walmart also will exploit automation wherever possible; few companies are as poised to benefit as much from automated trucking, and it seems certain that the company will use technology to keep whittling away at its headcount. Already, Walmart eliminated the positions of 7,000 back-office workers (most of whom were deployed elsewhere), and it is now rolling out a self-checkout app, which will eventually displace at least some of the company’s cashiers.

Meanwhile, on the sales floor…

While customer experience in the stores is better, it’s not clear whether wage increases have boosted employee recruitment and retention—yet. Walmart declined to make available statistics that would show whether it’s getting more applicants for its openings, and whether new associates are staying with the company longer. It did say its internal metric of “clean, fast and friendly”—which gauges how inviting its stores are to customers—is improving.

Another metric Walmart pays keen attention to are inventories: the goods it received from vendors but has yet to sell. The value of its inventory in July fell almost 4% from the previous year, which Walmart attributes to getting goods faster from the truck to the shelf.

There’s no doubt the Walmart stores in and around Bentonville—where I was given a tour—excel at being clean, fast and friendly, but those are the most well-maintained Walmarts in the US. Particularly during shareholders’ week, when the company flies in guests and celebrities to Bentonville, the stores sparkle, with no empty shelves and cheerful, bright-eyed employees stationed everywhere.

To check out a more representative store, I recently drove from my home in Westchester, New York, across the Hudson River to Suffern, a middle-class community notable for its diversity. Inside the store, ultra-orthodox Jewish teenagers shopped alongside Latino families and Muslim women wearing hijabs.

Quartz/Oliver Staley Outside a Walmart in Suffern, New York

The Suffern store was far more disheveled than its Arkansas counterparts, with shopping carts of clothing adrift in the aisles and a particularly sad-looking collection of children’s bicycles heaped in the parking lot. But the store was jammed with shoppers, and the store workers, while busy, didn’t look particularly stressed or harried.

When I talked to one, whom asked that I not identify him, he said he left a similar position working for a luxury retailer to come to Walmart because of the opportunities for advancement. Another employee, a part-timer, said the work was demanding but the terms were fair, and he appreciated the small perks, like the 10% employee discount and the 15-minute coffee break he got every two hours.

But Walmart has a long history of alleged hostility to workers, and not all of its practices—nor its reputation from them—will change overnight. The retailer has repeatedly been sued by women claiming the company discriminated against them. In 2008, the company settled class-action suits worth at least $352 million with hundreds of thousands of employees who said they were forced to work off the clock. In a separate case, the company was forced by the Pennsylvania courts to pay $188 million more.

In an email, Walmart spokesman Blake Jackson said the company has addressed wage and hour violations with tougher policies, improved time-keeping systems and additional training “to make sure all our associates understand the importance of those policies and comply with them.”

Parts of the world, including the US, still shun the retailer. Walmart has yet to open a store in New York City, San Francisco, Seattle, or Boston, despite vigorous lobbying and the presence of other big-box rivals like Target.

After phasing in the wage increases over two years, its average pay for full-time employees is now $13.69 an hour, Walmart says. That’s a 7% increase from the average of $12.80 before the increase, and more than $6 higher the federal minimum wage. Some employees claim that wage increase can come with a reduction in hours, as store managers are still under pressure to keep payroll lean. Others have yet to see any meaningful change in their paychecks. Cynthia Murray, 61, a longtime worker at a Walmart store in Laurel, Maryland, active in campaigning for worker’s rights, said the company’s pay raises are a boon for new employees, but it hasn’t helped her. “October makes 17 years for me and I don’t make $15 an hour still,” she says.

While McMillon may still have to win over skeptical workers, his decision to raise wages is intended to change the national conversation about Walmart and its business practices.

“We’re out to earn trust,” McMillon said in his June speech to employees who had gathered in Arkansas for the annual shareholders meeting. “When people shine a light on Walmart and see our decisions, the jobs we create, the activities in our supply chain, we want them to like what they see.”

Was Walmart headed here anyway?

The impact of Walmart’s pay increase is most pronounced in sections of the country, primarily the Midwest and South, where the state-mandated minimum wage is low, and Walmart is the dominant employer, says David Cooper, an analyst at the Economic Policy Institute.

The increases have a significant impact on their households, and on the economy. The majority of US workers earning less than $10 an hour receive some form of public assistance; for every additional $1 an hour the lowest paid earn, the likelihood then need assistance falls 3% and saves the government $190 per worker, according to Cooper’s research.

And, of course, currently low unemployment rates have helped pushed the company into raising wages. With unemployment hovering just over 4%, the number and quality of workers willing to start at $7.25, the federal minimum wage, is dwindling. And because the minimum wage is rising in cities and states across the country—it will reach $12 an hour in seven states by 2020—Walmart’s decision may be just anticipating the inevitable, Cooper notes. This way, they get credit now for something they’ll be forced to do in a few years.

Or maybe something more fundamental is occurring.

Groups that pressured the corporation to raise its wages—and are now taking some credit for what’s happened—are encouraged by what they see. For employees to really feel the benefit, the company has to change how it incentivizes store managers, so they won’t cut worker hours to meet their profit goals, says Dan Schlademan, a former union organizer and founder of OUR Walmart, which began as a labor-advocacy campaign in 2010.

But if Walmart follows through, it would mean a remarkable about-face.

“If you look at Walmart, over its 50 year existence, they’ve always prided themselves on saying our employees are going to be the lowest paid,” says Schlademan. “Now they’ve changed their business model.”