Amazon, I believe, checks for the weight of the package to ascertain if the contents are what they were supposed to be.
Who’s to say it was returned in the original envelope?
Perhaps more likely the extremely light items weight is hidden in the variance of the return packaging weight and so those packages have to be opened?
In the OP case the product packaging was filled with dirt, which is not as easily discoverable without opening product packaging.