In fact, it might cost them money because it facilitates returns.
Businesses don't care if they give you a receipt.
They care if a receipt was generated by the machine, and are a check on the employee.
those signs "if we didn't give you a receipt your meal is free" take on a different meaning in that light.
Aren't receipts used to track the store's revenue, as in the numbers reported to your local tax agency?
As far as I know, it's common for cashiers to have a daily/weekly/monthly slack value that they are allowed to report as a difference between the number reported by cash registers and the amount of cash delivered, because SNAFUs do happen during a day's work.
Taiwan had an interesting way around this with a receipt lottery. Ask for a receipt, it has a number on it that enters you in a lottery. Presumably the generation of this number means the sale was reported.
https://guidetotaipei.com/article/taiwan-receipt-lottery-%E7...
https://www.economist.com/finance-and-economics/2019/02/28/g...
In my country, the cash register of every company that makes over x amount of annual revenue is connected via the internet to the taxman.
I'd like to mention the under-appreciated development of the cash register in the 1880s. Prior to the cash register, the owner had to trust cashiers not to pocket money. Cash registers became enormously popular and revolutionized sales since they kept everyone honest, as well as letting business owners know what was going on.
(The book "Before the Computer: IBM, NCR, Burroughs, & Remington Rand & the Industry They Created" goes into a lot of detail on this.)