Around 80% of trade-ins that take place in a GameStop store are re-sold in the same location. Those that aren't, though, are moved on to this enormous factory and processing facility in Texas.
If a game is traded in and the disc is looking a little worse for wear, it's sent here for cleaning (with the top layers of a disc sometimes literally scraped away) and then testing in "banks of test consoles stacked upon racks". If you trade in a console, it's sent here to have its hard drive scrubbed not once, not twice, but thrice.
The images you see here are from an IGN report on the facility, which also contains an interesting piece of information: once tested and cleaned, games aren't sent out randomly, or even simply to stores with bigger sales. They're sent out according to "algorithms based on buying patterns", which sees "More shooting games are sent to stores near military bases" and "More hockey games are sent north."