The Sotheby's auction page says the piece was "Acquired directly from the artist by the present owner in 2006", so either the owner or Soethby's collaborated with Banksy, or Banksy built the shredder into the frame in 2006.
Or, I guess, Banksy could have offered the owner the frame prior to the auction, without the owner being aware of what it did.