This is not an urban myth. When my son was working at Walmart he worked the return window a few times and twice came across this scam. Once a bag of dirt had been used and the other time it was rocks. He confronted the con artist both times and neither of them knew how the contents got into the box. One still demanded her money back. She did not get it.
Years ago I knew less than honorable people who would go from garage sale to garage sale buying up items that were in Walmart tagged boxes. They would then take the product back to Walmart and demand a “refund”.
I understand Walmart changed their refund policy after a lot of that went on.