Being unhappy causes a variety of issues that effect your cognitive ability. Humans simply perform better when they are happy.
How do you define happiness ? If "happy" is the baseline for existence a lot of us don't even exist.
Some people spent their lives working on this very topic:
https://en.wikisource.org/wiki/Of_a_Happy_Life
https://en.wikisource.org/wiki/Moral_letters_to_Lucilius/Let...
Unfortunately it is not.
It's one of the most common goals in life, but it's not so widespread as one might think.
Many live non-happy lives, still exist and still try to make their lives better, one way or another.