Animals are usually opportunist and will seek what is best for them, though I do believe cats and dogs chose their 'owners' differently. I've had tons of pets and in my house it was always easy to figure out who the pet's favorite was. Dogs hugest desire isn't to be loved, they want pack and seek an alpha-like person. My mom bought my sister and me a dog named Blondie. My sister would pet her and kind of play with her. I would to, but I was the one who would spend time teacher her how to shake, sit down, and other tricks. If she had a choice between my sister or me, I could commander her to my side. It wasn't because I spent more time with her, Blondie liked obeying. While I was living in a small country town full of farmers, I notices that dogs stick close to the one they respect the most. My neighbor who lived across from me had a dog who was the sweetest guard dog I've ever met. The girls took that dog everywhere but it was their dad that was alpha and who the dog liked the most, despite the bags of treats from the girls. On the other hand, my other neighbor had a Pomeranian. Husband treated like a toy that never minds, and the daughters casually played with it. But the wife was the dog's alpha and knew if it did something she didn't like, she wouldn't get treats. So I've seen dogs chose who they respect over nice treats, at least for long term relationships.
Cats though are pragmatic. I always felt they were the accountants of the animal world. They mentally keep track and tabs on how much food, treats, water, toys, belly rubs, and other specials you give them to sway who is the favorite. You have to court a cat into liking you if it already has a favorite person. If you cross some boundary, and it's different for every cat, they'll snub you promptly. I have to say that despite all the cats I've had, all of them were my mom's cats. I think part of this has to do with the fact that giving them a bath was my job. Nothing will ensure that you will get glared out from behind a couch or table like a soapy bath and a new flea collar. I was always in the red with my cats.