If you have been polite to someone all the time, it requires just one act of rudeness on your part to fall out of his favour. The person will easily forget all the occasions when you had been nice to him and remember the solitary occasion when you were rude.
Obviously, this is not rational. One is not expected to ignore the one hundred times a person behaved politely and remember the solitary slip-up. But that does not happen. Why?
I think, if you have always been nice to a person, he expects only that kind of behaviour from you. Any deviation shocks him and leaves a deep impression which overshadows everything else. Your general behaviour creates an image that you have to live up to all the time. Any deviation may set the tongues wagging.
Sometimes, you may not even know that your behaviour is hurting someone. You may be saying something pleasant or harmless, but the other person is capable of discovering some rudeness, sarcasm or harm in what you are saying.
If you are rude to someone all the time, a single gesture of politeness on your part may overwhelm him. He will forget all your rudeness and remember the solitary gesture of politeness. Reasons are again the same.
Therefore, from a practical point of view, it is advisable to be rude all the time with occasional flashes of warmth. The recipient of your behaviour will be impressed, feel obliged and advertise your goodness. On the other hand, being polite all the time with occasional slip-ups may lead others to paint you as a monster which, of course, you are not.