Cats are like that. Not all, but many cats go from home to home as it pleases them and as they find friendly people and good eating. I've had dozens of cats, and their loyalty is not unwavering. I've had cats disappear, only to come back a few months later like it's no big deal.
Right now I have no cat or dog, because pets are not allowed where I rent. But there is a well-fed solid black male cat who comes around just for a visit. He doesn't need to be fed. He just makes the rounds, staying a night here, a night there. No collar or tags. He is not feral at all, used to being pampered.
Years ago I had a black cat walk through my open front door, hiss at my dog, jump up on my couch, turn on his back and fell sound asleep. He lived with me about a year, surviving a company transfer then one day disappeared. Six months later on the day I was leaving Ata to move to Nashville, as I was locking the patio door and closing the Uhaul that cat jumped up on my patio, rolled over on his back, let me scratch his tummy and then got our of Dodge.
I was within 5 minutes of leaving there. Cats are unique.
Dogs are wonderful.