Image Source: Wal-Mart.

Wal-Mart Stores Inc. (WMT -0.13%) has been doing some soul-searching.

After years of operating as a bare-bones retailer, paying employees the minimum wage or as little as possible, the company seems to have turned over a new leaf. CEO Doug McMillon, who took the helm in 2014, has invested billions in higher wages and training in order to bring stores up to modern standards and improve customer satisfaction. McMillon lifted the base wage to $9/hour in 2015 and again to $10/hour in February of this year.

The moves seem to have paid off as same-store sales reached their fastest clip in years in the company's most recent report, increasing 1.6% in the second quarter.

It's been a long time coming for Wal-Mart critics. For years, advocacy, worker, and union-backed groups like OUR Walmart have called on the retail giant to hike wages and improve workers' rights, eyeing a minimum of $15/hour. The United Food and Commercial Workers, a 1.3 million-strong union, has repeatedly tried to unionize the company's workers.

However, Wal-Mart's recent efforts are causing some to see it in a different light. 

This new strategy of paying workers better to improve company performance instead of minimizing all costs has caused some to draw comparisons with Costco Wholesale (COST 0.24%), the membership-based warehouse retailer that has outgrown Wal-Mart for several years. 

When it comes to labor relations, Costco may be the diametric opposite of Wal-Mart. It's a veritable darling of labor advocates, and has avoided all of the union fights that have sullied Wal-Mart's brand. The warehouse giant pays a minimum of $13/hour and many of its store-level employees make upwards of $20/hour. It regularly ranks as one of the best places to work, and it has an exceptionally low turnover rate for a retail business. 

Costco's philosophy is pretty simple -- treat people well and they'll return the favor. The company believes it's more profitable in the long-term to pay people a decent wage because it minimizes turnover and maximizes productivity, commitment, and loyalty.

Borrowing from Costco

Paying its employees better and giving them more opportunities seems to be paying off for Wal-Mart, but those decisions didn't come cheap. Those two years of wage hikes will cost the company $2.7 billion annually, which is the primary reason why earnings per share are down this year and expected to remain flat next year.

Wal-Mart and Costco have very different operating models. As a no-frills warehouse operation, Costco displays its goods on pallets, meaning it does not need employees to stock shelves as Wal-Mart does. The buy-in-bulk nature of Costco also means it needs fewer cashiers as a percentage of sales as the average amount its customers spend is much higher, and the help-yourself nature of shopping there means there are hardly employees on the floor to assist you.  As a result, Costco is much more efficient with its use of labor, meaning it can afford to pay its employees less. 

Costco's revenue per employee, a popular way of measuring labor efficiency, is nearly three times that of Wal-Mart, as the chart below shows.

WMT Revenue Per Employee (Annual) Chart

WMT Revenue Per Employee (Annual) data by YCharts

That explains why it can pay its hourly workers about 50% more than Wal-Mart, since even with that gap its overall labor costs are still less.

According to a study by the UC Berkley Center for Labor Research, if Wal-Mart were to accede to labor activists' demands and pay a base wage of $15/hour, it would cost the company an additional $4.95 billion a year. That study was performed at the request of advocacy group OUR Walmart, so the actual number could be even higher, but a $5 billion increase in expenses would cut more than a third off of Wal-Mart's profit, a sacrifice shareholders would be unlikely to tolerate.

Wal-Mart and other retailers have raised wages as the labor market has tightened, making hiring good employees more competitive. But continuing wage hikes would have diminishing marginal returns, as there is little need for the company to offer a starting wage that's at least 50% better than that of the average retailer.

On the question of higher wages, Wal-Mart simply doesn't have the leverage that Costco does through its warehouse business model to pay average employees around $20/hour. The two companies' diverging pay scales may be due in part to strategic choices, but mostly they're a reflection of their much different business models.