Suffering has quite a few purposes for me.
Firstly, it acts as a counterpoint to happiness/pleasure. Suffering teaches me what I really do have that I can be happy about, and gives me perspective. Unfortunately, I don't always remember that perspective.
Secondly, and I don't know whether this is specific to me, but I find that when I'm suffering, I sometimes have this "clarity" which opens my eyes. Not quite in the sense that you suddenly notice the pole you just walked into, but in other ways as well.
Third, and I really don't expect many people to agree with me on this one, one of those moments of clarity gave me the following:
From pain, strength.
From pain, endurance.
From pain, destruction.
Sometimes it's just physical (exercise), but whenever I've been mentally or emotionally suffering, it pushes me closer to God, and for that I am grateful, and now I can even recognise it when I'm suffering, which helps me keep some semblance of a positive view.
Fourth, suffering has also taught me to be less reliant on this world, I've lost a lot of things, some material, some human, I've been hurt by a lot of things, and it's taught me that I can still live without them even though it may still hurt (I'm sure almost, if not all, of you remember your first love), and still live, even with the pain I've been through. While I might still feel sorrow at some of the more important losses, I know that I'm still going, that my spirit will stay alight until my time comes.
Fifth and finally, it's taught me to accept what comes, while I'm not going to go looking for suffering, if suffering comes, I'm going to face it, and if circumstances demand that I suffer, I will suffer rather than run, if need be. Perhaps that's altruism speaking, if so, it's something I still need to learn more of.