whoever said it’s illegal —? If it has a valid visa in it all the countries I have travelled through — particularly Thailand never had any problem - in fact Bangkok helped me link the visa in my expired passport to the new passport at the immigration desk. Why would it ever be illegal to keep your old passports I have about 12 of them.