This sort of thing is entirely possible thanks to Gamestop's policy of holding discs from new games behind the counter. The customer brings the empty case up front when purchasing, and the underpaid Gamestop employee finds the corresponding disc and puts it in its box. The major problem with this system becomes abundantly apparent with incidents like this: consumers have no real way of knowing if the disc they're being handed is the one that Gamestop employees originally yanked out of the packaging.
The best advice we can offer is to double-check Gamestop purchases for scratches, scuffs, or sharpie scribblings before walking out of the store. Unfortunately, we doubt that Gamestop's policies are going to be changing anytime in the near future.