I presume the retailers return them to Lego? What does Lego do with them? Do they keep the bricks in a giant warehouse? Or melt them down and recycle the plastic?
Unsold LEGO that's in the possession of retailers typically gets marked down until it's dirt cheap. But if there's still too much of it lying around, I think most retailers will offload it to OTHER retailers who specialize in things like overstock and fire sales. I don't think LEGO would take them back, unless they were defective.
As for what LEGO does with ITS unsold LEGO, that's another story. AFAIK, if they repeatedly won't sell after being marked down, their destiny is to either be destroyed, given away, sold in bulk, or turned into "play table brick". I know at one point Steve Witt set aside a whole bunch of unsold LEGO that was destined to be destroyed, and he tried to manage it himself with AFOLs-- that is, he tried to sell it to AFOLs and give it away to them as donations/prizes.
DaveE