Trials are sometimes set in place to make us stronger and more mature.
Rom. 5:3-5 NIV
We also glory in our sufferings, because we know that suffering produces perseverance; perseverance, character; and character, hope... because God's love has been poured out into our hearts through the Holy Spirit."
Also, James 1: 2-4 admonishes us to "Consider it pure joy whenever we face trials of many kinds, because we know that the testing of our faith produces perseverance. Let perseverance finish its work so that you may be mature and complete."
God uses trials, temptations and difficulties to build us up. It is times like this we are trained to build resilience, deepen our faith and prepare us for greater assignments.