Technically though, they really don't have a right to check every receipt as a matter of policy, or hold you if you refuse.
However, there was apparently a court case where someone tried to sue them for wrongful detention and lost. It's a bit complicated because the guy seems to have been trying to bait them into thinking he was stealing, but the ruling seems to indicate that because he could have resolved it by showing a receipt, it wasn't wrongful detention.
I tend to just walk out and avoid the receipt checkers at Walmart, but I've never actually ignored them or argued with them if they ask me to check my receipt.