Walmart's (WMT - Get Report) comeback this year hasn't been all about hourly employees earning more money, though that has likely helped boost morale and attention to detail at its supercenters.

Earlier this year, the world's largest retailer raised its minimum wage for store workers hired before Jan. 1 to at least $10 per hour from $9 an hour. New entry-level workers start at $9 an hour but can move to $10 an hour in as soon as six months by going through a training and development program.

Walmart workers that already earned more than $10 an hour received a pay increase of about 2%, according to the company, rather than having to wait until their anniversary date. In total, Walmart estimates that about 1.2 million employees of Walmart U.S. and Sam's Club will see their pay increase on Saturday, out of 1.4 million associates at its 5,000-plus stores and clubs nationwide.

Walmart's U.S. business went onto notch its eighth straight same-store sales increase in the second quarter with a gain of 1.6%. All three of Walmart's product categories -- grocery, health and wellness and general merchandise -- saw sales growth.

But there are at least two other reasons for Walmart's renewed momentum, both of which are directly tied to treating store employees better. 

Better compensated Walmart workers, better customer service. 

The Sweet Bonus Payout

There is probably nothing more motivating for a Walmart worker than getting a nice chunk of change at the end of a quarter for a job well done.   

Walmart awarded more than $200 million in second quarter cash bonuses to about 900,000 hourly workers in the U.S., tied to the performance of Walmart stores from May through July. Eligible associates can earn the bonuses four times a year - this one amounts to about $222 for each hourly employee.

Walmart disclosed in June at its annual meeting that its clean, fast and friendly customer service scores increased for an astounding 79 weeks straight. The scores, which measure levels of customer satisfaction, are tabulated by surveying tens of thousands of its shoppers each month about such things as check-out, store cleanliness and helpfulness of their employees.
"It's [paying attention to] the tiny, noticeable things that should be in our DNA," Walmart chief operating officer Judith McKenna told associates at the time. "Giving away a smile costs nothing -- people want to feel good."
Walmart giving away money is likely putting smiles on the face of its workers, who are already earning more per hour. 

Walmart focusing on giving employees more skills than than just the basics.
Proving a Clear Line of Sight for Career Advancement
For many, working at Walmart was always seen as a job that pays the bills instead of one that could lead to an actual career. But Walmart has taken steps this year to alter that mindset and retain employees who may otherwise would have jumped ship after graduating school or if another opportunity arose.
In February, Walmart opened its first training academy to teach new employees critical retail skills such as putting out the right pricing displays and knowing which items are turning a profit and why. Walmart calls the new training "upskilling."
By the second quarter of 2017, Walmart says it will have 200 academies with dedicated teaching staffs and students commuting from nearby stores. The academies will occupy about 3,000 square feet outside of Walmart stores.

Most students will live within 40 to 50 miles of an academy, says Walmart. Each store with an academy will have 15 to 17 extra workers, mostly managers, designed to serve as mentors to new employees while they apply their new skills in Walmart's some 4,600 U.S. stores. The training program will take two weeks, and employees get compensated for their time and travel.

The first academy opened on Feb. 20, the same day the world's largest retailer lifted wages for over 1.2 million workers. Walmart pointed out that stores with an academy have seen improved customer service scores.

"There is a war for talent, we realize the retail environment is changing," said a Walmart executive at its annual shareholder's meeting in June. When asked by TheStreet if Walmart fears losing its newly-trained employees to competing retailers, the executive said the company believes such training investments can help it keep employees happy and stay because they gain confidence they'll eventually be promoted.