When you go into a store to buy something you're going onto private property and if the store wants you to show them a receipt for items you've bought then they have a right to ask you for that receipt before allowing the merchandise to leave the store.
If you've paid for the item there's really no reason to not show the receipt as you leave the store and if you don't show the receipt then the store may call the police believing you stole the merchandise.
You're free to leave the store with the merchandise though as the store people cannot make you stay there or detain you but if you didn't steal the stuff then just show the receipt which takes maybe a few minutes and then be on your way.