There is such a wonderful thing in economics as the utility function. The greater this function, the better the person (or the state, NGO, company, etc.), the happier he is. Naturally, everyone will try to maximize this function. That is, the meaning of life is to maximize the utility function. Everything is too boring, right? No!) The most interesting point is this function itself, or, to be precise, the mechanism for calculating its value. Religions fit perfectly into this concept.