It also depends on the personality of the animal. I had one cat that hated everyone excpt the 5 of us that lived in the house with her, another cat was afraid of people with Gray hair. Animals will single out people or other animals that may have doen them harm in the past and not like the people that may look or act like them. The third cat that I had loved everyone, even people I knew to be not kind.
I had all three of these cats at the same time, so it was easy to find out what their likes and dislikes were.
THe female that hated everyone out side of our family, was abused by another family before we got her, the male scared of gray haired people was abused by people who had gray hair, the cat that loved and trusted everyone came to our home when he was three months old, and we don't know what his past before that was. All three cats came to us not from a shelter or pet store, they were all found on the street, there is only one that we knew of her family, only after she followed my mother home from a walk, she was my sister's Kindergarten Teacher's cat. The teacher did not like the way her husband and daughter were treating the poor thing so she let us keep her, after the fourth or fifth time she ran away from them.
Now dogs, I haven't worked alot with them, but I find that they react in the same way that my cats have reacted. I know several families in the area that own dogs and am a constant observer of them. Some are lovey to everyone they meet others have to build that trust realtionship with someone. So I guess animals, trying not to personify them, may or may not tell us if a person is good or bad, they are going to be like us, and trust only those who look like people we have trusted in the past.