Because it's a website. Websites glitch. It would be nice if online credit transactions worked as smoothly as in-person cash transactions, but they don't.
True, bugs happens.
But, it's kobo's responsibility to make sure the website answers properly. Paying for the second card would have been a nice gesture from them.
Reading unicorn1's note about not deleting it, would have been a good idea. Send back an e-mail saying "sorry, we can't repay you the gift card, what do we do ?" would have been better.