According to Yoga philosophy, we humans have two purposes in life: experience and liberation.
That's right. One of our purposes is to fully experience the joy, sadness, pleasure and pain that life has in store for us. We get to have the adventure, companionship, and ecstasy, along with the challenges, of life.
As we fully live our lives, we get in touch with life's pleasures and its limitations. Sickness, illness, advancing age, and suffering visit all people. No one experiences unending pleasure; all things are ephemeral. All people die.
Life's limitations, the repeating experience that nothing in life lasts or gives unending pleasure and happiness, provides motivation to search for true, and unending happiness. Eventually, this leads to paths, such as Yoga, where one searches inside himself or herself for the answer to the riddle of life. Over time, this leads towards realization of our True Self and to final liberation.