These days, I think Walmart is not the easiest route to liquidate gift cards though. They used to allow some silly things like combining many gift cards to buy one money order, but are at least supposed to restrict it now.
(I have not passed the bar, this is not formal legal advice)
Chase still offers big incentives on office supply stores, so that's probably the main driver of MS right now aside from sign-up bonuses. Staples quite frequently offers $0 fees on their gift cards to encourage this.
https://www.nerdwallet.com/article/credit-cards/credit-card-...
https://viewfromthewing.com/free-miles-for-churning-presiden...
Presumably the mint was eating the credit card fees on this, so effectively it was a transfer of money from the government to the churner, with the credit card company keeping some amount on the way.
So yes, a transfer of money from the government to the purchaser, but with a lot more steps.
Don't forget the free shipping. The USPS probably got paid by the mint.
https://www.nerdwallet.com/article/credit-cards/credit-card-...