EDIT: I apparently fell for a fake news Lemmy community. Its explained in the sidebar. I gave the OP the benefit of the doubt that they couldn't link the real new story, but trusted the attribution to APNEWS. If you enjoy participating in OPs social experiment on posters you're in the right place. I'm not, so I'm out.
In this case I'm not. If we take the most cynical view I don't think Walmart would be offering this for the benefit of its workers. That just happens to be a side effect.
Human labor is expensive. The available workforce that is both housed and has their own bathing facilities have demands on short commute to work, consistently rising wages, preferential hours, and preferential tasks. Even with these demands, employee turnover is very high increasing repeated training costs for replacements. This new pilot would allow Walmart to access another pool of labor that would be willing to forgo those things. However, there are certain hygiene demands that Walmart has of all of its workers irrespective of where they source the labor. Being well slept and bathed are two of these. Walmart can provide the facilities for these two things at a low cost to Walmart. Showers already exist and DCs so just some operational costs there and the real estate for the housing is already company owned as its in an unused warehouse. The only new costs are the sleeping pods, which are likely not expensive in volume to Walmart should this pilot be expanded, and they are charging a small fee to their employees using them further offsetting the cost to Walmart corporate.
The end result are additional workers that were not fit to work at Walmart before, but are now, and provide benefits to Walmart to increase the labor supply to its locations especially where acquiring required staffing has been difficult.