Have you heard of that phrase "Treat others the way you want to be treated"?
I realise that it actually happens. To me.
I've been observing myself (hahaha I sound like I'm not attached to my own body!), and I do realise that when someone speaks politely to me, I naturally will do the same and would probably become super duper friendly. When someone speaks to me grumpily, I tend to speak right back at them the way they spoke to me and when someone gets frustrated for no reason when speaking to me, I often choose not to speak back at all and probably would continue doing what I was doing or leave the place i.e. watch TV, read a book, continue working.
Naturally, I believe someone does earn respect because of their character.