The only hotel that has ever asked me for room keys at checkout was one which still used physical keys (the kind that jingle on keychains). It's quite common for guests to simply leave room keycards in the room at checkout. Some hotels even have an "express check-out" box in which to drop keycards on your way out. Further, the front desk will happily re-issue magnetic keycards if you claim you lost yours.
I don't really see any situation where a front desk would require magnetic keycards to be presented in person at checkout. These things cost mere pennies in the quantities any hotel is buying them. There was some discussion of a hotel that used RFID proximity cards requesting that they be returned on checkout or be faced with a $1 charge per key. I've kept a few of those without repercussion.