Shopping dockets

It’s an interesting concept checking your receipt when you leave the store
I rarely participate in that whole process and at times I have questioned the staff member scanning the receipts as to why they are doing it
Both Bunnings and big W , Coles and Safeway say the same thing that it’s to prevent theft as some people would find an old receipt in the cat park or bin go into the store and pick the exact item ,
Then present it to the cashiers desk asking for a refund
To me this doesn’t really add up as they give you a refund in cash only if you purchased it in cash otherwise an eft transfer is the method of refund ,
I’d call furfey. Because if it’s to prevent theft why don’t they search your bag for stolen items when they scan your docket?
They have never searched mine
So what is the actual purpose of scanning your receipt that they just printed you   
I’d like to hear your ideas as the issue perplexes me
Cheers