What would happen if the magnetic stripe were accidentally erased on the card?
While we often think of ethics in terms of what is right or wrong for an individual, we don't often consider them in terms of what is right or wrong for a business. Consider your bank debit (ATM) card.
It is easy to say yes, from a consumer perspective, but what if it were YOUR company? Remember, companies are not often legally required to provide 100% perfect service, provided they correct any account issues that may come up. If they are not legally obligated, then why SHOULD they compensate when doing so just raises their expenses that must be passed on to other consumers. Should the company whose systems failed be required to compensate you for your inconvenience?
I'm not sure if yours is an ideal example. If a magnetic stripe is erased, it is often due to misuse (attaching to refrigerator with a magnet, for example) or age. If the magnetic stripe stops working and you can't swipe a card, you just go to your bank or call them and they replace it for free. This doesn't really constitute a dilemma. In theory, a bank could charge you for a replacement card, and be fully justified from an ethical perspective, but most banks would not do so, because the cost of a new card is quite small compared to the possible loss of goodwill.
A more complicated issue would be if a hacker got into ATM records and stole your data and then used that data to remove money from your account. In that case, the issue for both cardholder and bank would be liability. If it is clearly the bank's fault in having ineffective security, then the bank takes the loss.
If, on the other hand, you left your card in the machine with a post-it note with your PIN number, and the loss is your fault, you would be liable for the interval between when you lost the card and when you reported it missing. Again, the issue is customer goodwill vs. strict liability.