God is aware of each one of us and the experiences we have here on Earth are timely in duration and intensity to be a perfect trial of our faith. “God is faithful, who will not suffer you to be tempted above that ye are able; but will with the temptation also make a way to escape, that ye may be able to bear it” (1 Cor 10:13).
He has prepared this life to test us. “To be tested, we must have the agency to choose between alternatives. To provide alternatives on which to exercise our agency, we must have opposition.” (Dallin H Oaks) The ability to choose is held inviolate. God will not take away the ability to choose from anyone of us before our appointed hour to die. He does expect us to self govern and temporarily take away the agency of those who break the laws and contracts of our governments. The final judgement of what a just consequence should be he reserves for himself.
God gave his son to atone for our sins so that even the justice of God could be counteracted with mercy if we believe in Him and have faith in his son’s atoning power. In this way, he prepares “a way for our escape from the grasp of this awful monster; yea, that monster, death and hell” (2 Ne 9:10).
And so good and bad continue to coexist in this world. How does God react to this without intervening unjustly before the appointed time? Sometimes he eases the burdens of those who are suffering so that they can bear up under the conditions in which they find themselves. Sometimes he turns aside disasters (without stopping them) so that they do not affect the faithful as severely. Sometimes he blunts the effect of an evil act so that the lives of his children are spared when they might have been killed. Sometimes he lets us see evil to teach us what we do not ever want to repeat.
God’s assurance is that He will “consecrate [our] afflictions for [our] gain” (2 Nephi 2:2).