CompUSA is the big example, since they were the last big electronics retailer to offer their employees an "at cost" discount. Computer City and Good Guys also did this, and both in the days before becoming part of CompUSA. The idea was that a person that owns a product is better at selling a product. There was no reason to markup "cost" to the employee.
Here's how it works: Retailers get bent over and screwed hard in the console business, from Sony and Microsoft. Nintendo is actually a pretty good partner. The cost varies depending on platform and publisher, but it breaks down in to a couple categories. The big publishers (EA, Activision, Sony, Microsoft) run a cost of about $52 to the retailer on a $60 game. Ubi, Atari, Square and the like run about $47. $40 retail games are about $34 across the board. Contrary to futurecode's assumption, consoles are a bit different. For example, a launch 360 at a $400 sticker price cost Microsoft like $450 to make. They sold that to the retailer at about $385. The retailer makes a little bit on a guaranteed sale since stock is restricted everywhere, and Microsoft loses a little bit more than everyone assumed. Over time, cost of production on that console drops, it costs say $390 for Microsoft to make, and the retailer cost drops to the $355 range.
No there is no buy-back program like with books. Any stock that a retailer buys is theirs. When a $60 retail game that cost $52 drops to $40 retail, the retailer eats that $12.
For the vast majority of retailers, selling games is a losing proposition. At best they break even, but more than likely they use games as part of their marketing strategy. Every time you see a Sony, EA, MS, etc game in a weekly ad, the publisher paid a part of that ad's cost. Sometimes that dollar value is greater than the video game business is worth to the retailer, and it drives people in to the store to buy other things.
So, why do retailers put up with getting gang-banged by Sony and Microsoft? It's very simple. People want to buy PCs with Windows on them, and TVs with the Sony name across the front. The retailer is very plainly told "You will sell our consoles and related products, otherwise you will not get our other product lines".
Now, I agree that Gamestop is a piece of crap and a cancer on this nation. They absolutely could not survive without the used market though, so at least their "buy used, buy used, BUY USED" strategy makes sense. That's the same reason that it's very difficult to find stock on a newly released game there. It's already disingenuous when an industry professional complains about the used market. It's even more so since the used market is so vibrant as a direct effect of Sony and MS being such bad partners to their retailers. If Gamestop got better margins on their new product, they wouldn't push used product nearly as much.