This was a great boon for banks a few decades ago, as it functionally gave them a huge ATM network for free.
The debit card system understands this sort of transaction, and doesn't charge the normal x% processing fee on the cash withdrawal portion of the transaction.
In other words, retailers can create transactions that are effectively ATM withdrawals - without an ATM.
This turns it into an ATM withdrawal apparently.
If I just need $80 or so (I think the limit is $100), it's faster to go to the local Walmart and buy a candy bar or something and get back $80 cash than to go the closest ATM owned by my bank to avoid the double dipping fees.
The ATM has to be actually refilled with cash, so they charge you for it.
The only charges I encounter are from using my bank's card at another bank's ATM.