Just so we're clear, there is nothing underhanded or unusual about buying a very small item with a debit card, and getting cash back. Plenty of people use it in lieu of an ATM.
For customers, it's convenient and cheaper. For stores, it draws customers into the store and also offloads their risky cash into less-risky debit card electronic transactions.