Arthur Schopenhauer said this quote

If the immediate and direct purpose of our life is not suffering then our existence is the most ill-adapted to its purpose in the world.