I think the meaning behind the quote is that no matter who you are or where you think you fit within society being kind is always appreciated even if it's not by the person you were being kind to.... In other words, what you give you'll get back.
I found this explanation as to the story behind the quote. Whether it's true or not I don't know.
Hope this answers your question. Thanks for asking as it gives us all something to reflect upon.