When we do a good thing or help someone, we feel good. We are happy with ourselves and have very warm emotions for the person we helped. When we justify our effort, we idealize the person we were so generous to and convince ourselves that they deserve this treatment. As a result, we have an emotional anchor and start liking the person even more.