I never understood how selling used digital games is illegal. It's certainly against the license agreement, but people have the right to sell their stuff and barter it, and game license keys are unique to each copy, which means they can be resold. Has anyone actually been found guilty of selling a "second hand" game, 'cause that's just ridiculous...
Ignoring the legal issue, second-hand purchase of software with license keys, particularly on ebay, is dangerous because those keys may be in use by other people. If the software uses an internet licensing server, it might disable itself because the key is already in use. Buying windows on ebay is a good example.