Germany for example mandates printing a receipt. The receipt must be stored in a certified storage inside the cash register and is signed cryptographically, including the hash of the previous receipt such that there is a hash-chain of printed receipts. Therefore each printed receipt that the customer takes home (and maybe at some point hands in to the tax office for some reason) can be used to check the integrity of the cash register storage and all prior receipts in the chain.
https://www.lexware.de/wissen/buchhaltung-finanzen/neue-rege...
https://www.lexware.de/wissen/buchhaltung-finanzen/kassenbon...
Many other EU countries have similar regulations, and in some cases had them for a long time.