Until a few decades ago, cats were kept only to hunt mice in a semi-wild state. They were given rare leftovers of food, no cuddles and scarce relations with the man. So there was no one to whom they could bind. This is why the prejudice that they only became attached to the house, the territory they knew, was born and that if you took them to another place they came back.
In the nineteenth century, the entomologist Jean-Henry Fabre supported this in one of his stories, spreading and giving authority to this idea. In reality, the cat is a highly relational animal and if kept with love it becomes very attached to its owner, follows him and agrees to go with him to a new house and also to a hotel. Of course we must not move it like a package (for example closed in a bag as Fabre advised) but as a sensitive and intelligent creature. A good method is to talk to him a lot, reassuringly. And in the new house you have to supply him immediately with a bed to take refuge.
Also read how to deal with the cat when dealing with a move