Nobody optimizes for happiness but they do optimize for "cheerfulness".
> The goal of life is cheerfulness (euthymia), which is not the same as pleasure . . . but the state in which the soul continues calmly and stably, disturbed by no fear or superstition or any other emotion
> “True happiness is to enjoy the present, without anxious dependence upon the future, not to amuse ourselves with either hopes or fears but to rest satisfied with what we have, which is sufficient, for he that is so wants nothing. The greatest blessings of mankind are within us and within our reach. A wise man is content with his lot, whatever it may be, without wishing for what he has not.”