It only applies to big companies for now, and it's not rocket science - stores already had to deal with unsold inventory.

I helped a charity that distributed misc items to families who needed them, and I remembered seeing lots of brand new t-shirts from a big supermarket chain. Guess they were already doing it 10 years ago, either due to local regulation or as a tax write-off.