The strange economics of what companies leave for dead turn trash into treasure.