I found that all the Pokemon transferred from bank will default as illegal.
After I click the "!" button, I found that PKHex will add Residence info to make it becomes legal.
Since these Pokemons are legal originally, it should not become illegal after transferred from Pokemon bank.