I think it was covered either in the article or one of the comments here. But the companies don't really care because the mattress cost very little to make so they don't really make a loss if the customer was never going to buy it anyway.
The amount of effort and time required would just barely be covered by the profit. You also have to store it until sale. That's probably what keeps this from becoming a widespread scam.
I think you underestimate people's desire to scam the system. Buy $1000 mattress, leave in box, "return" mattress and get $1000 refund. Sell online (instead of donating) for $300-400. Rinse, repeat.
The "rinse" part is where it gets tricky. There are firms that track returns (at least for retail). I've seen people have their returns straight-up denied.
I am sure it's a thing and if it is not, it will be.
I bought a casper mattress. I now wish I had started "return proceedings" and gotten a refund, because it sounds like they just tell you to donate it.