Pain is a lot of things – exhausting, frustrating, uncomfortable, scary – and useful is an item on that list.
I know. How can this awful experience actually be useful. Consider putting your hand on a red-hot stove top. Without pain to alert you to the damage being done to your hand, you may leave it there until there is very little hand left! Pain, like stress, has a job to do. Keep us safe. The unpleasantness serves as provocation to take an action that removes one from harm's way. Without pain, life becomes very very difficult and our very ability to survive is jeopardized. Just ask these people here.
So, it has a job to do. An unpleasant job. But a necessary job nonetheless.
When we are experiencing pain, it is our body's way of saying “there may be trouble afoot – pay attention!” It demands a change in behaviour - removing your hand from the hot stove for instance - in order to reduce the threat of injury or get out of danger. Pain does not mean the same thing as injury, however. Much like the fire alarm in our home alerts us to the possibility of a fire, pain's job is to alert us to the possibility that there might be an injury. And just like the fire alarm can go off with a bit of burnt toast, our pain alarm can go off without there being actual injury.
Enough from me though – learn a bit more from Professor Lorimer Moseley in this short TEDxTalk or dig deeper down the rabbit hole with this lecture.