I'll go a bit further out on a limb and say that both cats and dogs take on some of the personality of their owners. They still have their own personality to be sure, but they pick up some of our habits and the way we see the world.
We have four dogs and three cats, and all of them have distinctive personalities and are different from one another, BUT all of them are kind-hearted and sensitive and all of them have their own way of joking or tricking or being funny. Also all of them are homebodies. They each have these qualities because they were raised in a pack where these qualities are highly valued.
I also think that our pets are very good at seeing the space in our lives that needs filling. I think they are better than that than we are. When my partner and I got together, her daughter was 13 and struggling with ADHD, a touch of autism, and the horrors of being that age. My crabby old female cat took one look at that kid and moved into her room. I honestly wonder if our daughter would have made it without old Tubby cat there for her. She cried on that cat, talked to her, fed her pieces of bagel. And that cat doted on her girl and stayed with her all the time. Oh, once in awhile Tubby would come upstairs and remind me that she had been my cat for 12 years before this teenager took over the basement. She'd come find me and let me pet her, but she and I both understood: Tubby was NEEDED downstairs by a teenager who'd never had a pet and needed a non-judgemental friend very badly. And Tubby, who had used up several of her nine lives by falling out a window, swallowing a sewing needle, having her kidneys inexplicably fail briefly, and so on . . .that cat lived to be sixteen years old. She lived long enough to see that girl of her's off to college. She was a remarkable cat.
The point of my lengthy story is to say that I think our pets both take on some of our personality and also become what we need them to be.
Sometimes I think that each one of them are little miracles.