Newer/better ones will force you to take your card back before dispensing cash, which I think it's an elegant solution. Keeping your card in the first place is, I suspect, a security thing.
There's a definite trade-off here: on the one hand, people are less likely to forget to take their cash; on the other hand, people who find a forgotten card in an ATM are unlikely to abuse it, but if they find cash, they'll probably just pocket it.