When a Visa, Mastercard, Amex, or Discover card is used about 1-3% of the purchase amount is paid from the merchant to banks. When a debit card is run on a low fee network (you can usually tell because you key in your PIN), as little as 0.05% + $0.21 is paid thanks to the Durbin Amendment. The receipt will show "US DEBIT" instead of Visa/MC. On the back of your debit card there's logos like NYCE, STAR, PLUS, Pulse, etc.
Apple Pay originally did not support "US DEBIT" and all transactions ran over the familiar higher fee networks. It was only later that true debit support was added. What this meant is that merchants who upgraded to tap capable card readers not only paid extra for the hardware and certification, but would increase the proportion of higher fee "credit" transactions in their mix of transactions.
Walmart is a discount retailer. Their modus operands is cost efficiency on everything: cost of goods sold, trucking, staffing, and in this case the 1% saved when a customer inserts their debit card and types a PIN instead of not typing a PIN. If a retailer has a 5% profit margin, shaving card fees in half would increase earnings 20%. This is the same reason why banks don't let you make loan payments via card and property managers don't let you pay rent via card or add a 3% surcharge.