Given the task definition and input, reply with output. Generate the answer for a given question. The question requires common knowledge of English. Make sure that the answer is in detail, long, consistent with the context, and requires general knowledge of English. To be less repetitive, please vary your language for each question. Give a proper explanation to answer, and if necessary, provide the definition of various terms. And conclude your answer if it's long. If you have used other resources (e.g., Merriam Webster's.) to answer the question, include citations in your answer. You don't need to paraphrase the context of your resources, but make sure that your answer is consistent and complete.

Once when I was having a hard time a guy said to me, 'I'm sorry you're having a hard time, I'll pray for you,' in a way that made it clear that he was glad I was having a hard time because it gave him the opportunity to pray for me and feel good about himself. I am interested in this phenomenon but also the much more general (probably universal) phenomenon of human beings finding justification for things they want to do, often by lying to themselves about the utility of the behavior to other people. The best single word I can think of for this is contrived, but it is not close to precise. Similarly, dissembling, insincere, and so on don't really cut it. I also looked at this list of cognitive biases but was unable to find one that expressed this idea. Is there a single word for this? If not, a short phrase?.

I am not sure if you are stuck to the notion of altruism, but in the context of making a show of being nice to others to make themselves feel good, you could use sanctimonious. Sanctimonious is a twist on the words sanctity and sacred, which mean holy or religious. A sanctimonious person might think he's holy, but their attitude comes across more like 'holier-than-thou.' Though sanctimonious people might try to act like saints, their actions are far from pure or holy, which just makes them sound like hypocrites. Vocabulary.com