I have many issues with providers doing that. The reason they take your money and give you credits in exchange is because that gives them lower credit card processing fees (one larger transaction vs. many smaller ones). If they're going to do that to make things cheaper for them, then they should let me use those credits whenever I want, no matter how far into the future I want to use them.
If not, they should refund them. They absolutely should refund them if I close my account.
If I'm going to give you money, I expect something in return for every cent of it. That's just basic decency.