For Epicurus, the purpose of philosophy was to help people attain a happy (eudaimonic), tranquil life characterized by ataraxia (peace and freedom from fear) and aponia (the absence of pain). He advocated that people were best able to pursue philosophy by living a self-sufficient life surrounded by friends. He taught that the root of all human neurosis is death denial and the tendency for human beings to assume that death will be horrific and painful, which he claimed causes unnecessary anxiety, selfish self-protective behaviors, and hypocrisy. . . . He taught that people should behave ethically not because the gods punish or reward people for their actions, but because amoral behavior will burden them with guilt and prevent them from attaining ataraxia.
—From Wikipedia
So right, so long ago, and so many still haven’t figured it out.