Capitol One in the US does this with their secured credit card. After so long (or some other set of risk management criteria is met) a secured card transitions to a regular card and the deposit is returned to the customer.
Otherwise the customer has to close the card to get their deposit back and they then lose what is possibly their longest held credit line, affecting their credit score.