Pleasure is one thing; wisdom is another.The first leads to sorrow, though pleasant at the time.The latter, though at first unpleasant, leads to lasting joy.
The gratitude that we encounter helps us believe in the goodness of the world, and strengthens us thereby to do what's good.