The animals probably see the kid’s three guardian angels. :-)
I’ve actually thought about that. It’s uncanny really.
I’m always careful to warn my kids ‘that’s not our dog/cat, he/she might not want strange kids to pet him/her’ when we visit someone’s house.