The ultimate goal of human thinking is to pursue happiness and avoid pain.
People's thoughts are complement to get a happy pleasure and avoid painfulness.