Walmart wouldn't take credit if it wasn't financially sound for them to do so.
We don't know Walmart's feelings, they may like the arrangement. Business go cash free for all kinds of reasons. Customers that use credit spend more money than cash customers. Walmart probably isn't one of those places that benefit as much as a pub but they may have a small credit spending boost that covers the fees.
Walmart is a really smart and data driven company and I'm sure they've weighed their options about what is effective business practices for them.
[0] http://time.com/money/3541247/apple-pay-walmart-current-swip...