When people are happy, they become content and complacent, preferring to sit idly by rather than work or create. Pain, though, requires action; we seek to do whatever we can to alter our circumstances -- to vent our frustration or angst, to distract ourselves from our ailments, or simply to express our sorrows. The way we operate is vastly different from that of other creatures, we have this innate tendency to be idle rather than to work. The betterment of ourselves is something we consider best left for another time or another place, and therefore we need a motivator; without something to prod us along, we do nothing. Humans are irreversibly lazy creatures.
When we were created, we had a twofold purpose: to fellowship with the Lord, and to tend to the Earth. We were charged with being the caretakers of the world and all that is in it, a job that man fulfilled admirably until his fall. When man received his punishment for his wrongdoing, the Lord issued a curse:
"And to Adam he said, 'Because you have listened to the voice of your wife and have eaten of the tree of which I commanded you, 'You shall not eat of it,' cursed is the ground because of you; in pain you shall eat of it all the days of your life; thorns and thistles it shall bring forth for you; and you shall eat the plants of the field. By the sweat of your face you shall eat bread, till you return to the ground, for out of it you were taken; for you are dust, and to dust you shall return."
It strikes me as entirely possible that not only was God referring to the fact that the Earth would be difficult to maintain from that point forward, but also that we would be universally motivated to our work by pain. Man's newfound selfish nature would motivate him to idleness, seeking his own pleasure before the necessity of his work, and so we began to require an element of unpleasantness to stifle our idleness and again make us productive. In this way, pain is a motivator in the most basic sense.
From a deeper perspective, though, pain is more than a simple prod to the rear to spur us on to action: pain is potentially our strongest creative influence. What works of artistic value are not created out of a release of pain more than likely are created out of the euphoria that comes with being released from a prior pain; be it agony or gratitude from an agony assuaged, pain brings out the beauty in us. Like an abrasive brush polishes metal, pain scrapes away the built up grime of our self-indulgence and lethargy. Through potentially the greatest of all ironies, it is the most significant of our weaknesses that has the potential to make us stronger than anything else in this world. Stories of people who have been horribly wounded by some past event, and through that pain have been motivated to overcome obstacles most people would consider impossible are immortal. Even in fantasy, pain is inescapable: one of our most long revered childhood superheroes is the outpouring of a tormented soul and an anguished childhood.
Thus is the desolate nature of this unhappy world in which we live: we are creatures capable of only what our own sorrows allow us to be. Without each our own personal demons, we languish in our own pleasure induced squalor.