Immutable laws govern the universe created by God and make it work. As such, human beings who are part of this universe must always study these laws and seek to better understand them and abide by them.
They suffer due to the difficulties they encounter on their path; but these difficulties are also a source of riches for them because they make them surpass themselves.
One may often wonder why the Lord does not spare the righteous.
Because he loves them.
His love brings them growth and fulfilment; they simply need to ask themselves how they can use their suffering to improve themselves.
You must not seek suffering of course, but when it appears, do not try to escape it, for through suffering you progress. And there is always progress to be made so you may go further and rise higher.