I'm trying to think of what my definition of respect is in regard to a dog. But I think, for me, it all comes from expectation and what a dog knows they can get away with with one person but not another.
I've been the main trainer and caretaker of all of my dogs, and they're all much more polite and well mannered with me than anyone else. They wouldn't dream of stealing food from me or anywhere within my vicinity, and if I tell them to go away or stay out of a room, they oblige and respect that until I say otherwise. They don't push and shove their way in for attention from me and instead politely wait for me to finish with another dog. Just all kinds of things. And I believe it stems from the fact that they all have more of a working/training/playing relationship with me (vs. just a "petting and occasional treat" relationship with someone else) and therefore have a different bond with me, but they also know that I just will not tolerate certain things and will enforce their rules, so they (most of the time) don't bother pushing those boundaries.
They, well mainly Keira, really disrespect my mom. She tries hard, but they know that the follow through is less with her and an actual clear reward is less (because she doesn't do any of the training - she'll just give them cues that I've taught and rewarded for, but she herself forgets to reward even with a "good job" sometimes) as well. So therefore, in Keira's mind, breaking a rule and disrespecting my mom has more reward in it for her than just listening in the first place. She walks all over my mom and pushes all kinds of buttons that she would never, ever attempt with me, and the only reason I can see is simply that my mom doesn't have any kind of relationship with her at all other than she feeds her dinner sometimes and pets her and loves her and tells her to get lost when she does something naughty when she turns her back for .2 seconds haha. And she accidentally rewards for pushy too.
I think it's more just a training and management/enforcement thing than an earned thing, although I guess if I really think about it, I've kind of earned their respect by building a relationship with them and they've learned what is expected of them.
I don't know. I've never put that much thought into it. I just know my dogs respect me and and know my expectations of them, and that they clearly don't feel the same toward anyone else we live with.