The purpose of trials is to build your faith.
To lead you to depend more on God.
Sadly, many instead lose their faith at this point. And they decide life is arbitrary, that there is no justice, no overarching design nor control, no
providence. Life is meaningless, they say. (Yet they still try to imbue it with meaning.)
Go back to God again and again until your trial turns to triumph.