Some hotels keep your personal info, including your credit card number/expiry date, on the electronic keys. I'm not sure why exactly they would do this but it's really nothing to get all that worried about, so long as you destroy the card when you're done and don't lose it while you're staying at the hotel - just like you wouldn't want to lose your credit card.
The idea that the employees of the hotel have access to this information because it's on your hotel key is not really something to worry about - if the employee wanted to he/she would steal your credit card info long before it hits the electronic key.