One reason that God allows us to walk through difficult times is to turn the focus of our faith towards Him.

He wants us to see beyond our problem to His solution, beyond our weakness to His strenth, beyond our need to His abundant supply.
Roy Lessin

When you go through deep waters and great trouble, I will be with you.
When you go through rivers of difficulty, you will not drown!
When you walk through the fire of oppression, you will not be burned up;
the flames will not consume you. — Isaiah 43:2 NLT