Psychiatrist Dr Sarthak Dave explains that when people experience pain, the mind unconsciously uses defense mechanisms to cope. Altruism is a mature defense mechanism where individuals manage their own pain by helping others facing similar struggles. This process occurs at an unconscious level of our mind, with minimal conscious involvement, as a way for the mind to heal itself.