Surly if a company goes bankrupt then any contract made will be void.
No, not quite, that only happens when the company is formally wound up. During the administration process when the administrator will try to find a buyer for the whole company, the assets, intellectual property &c the contacts can be "sold" to a third party buyer. However, during the novation (contract transfer), the customer has the right to say NO. They cannot be forced to move but until that point the contract remains valid. It is, in cases like this to move all customers across unless they object and they cannot be treated less favourably than before.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
M H C
taurus excreta cerebrum vincit