The troubles and tribulations of this life are transitory and our hope is fixed on the glory of God. Our sufferings produce perseverance and they test or prove our character and they give us hope because we share in the sufferings of Christ.
A poem that describes this
I walked a mile with pleasure
She chatted all the way.
But not a thing I learned from her
For all she had to say.
I walked a mile with sorrow
And not a word said she
But oh the things I learned from her
When sorrow walked with me.