The question was raised recently about why God allows people to do bad things. To answer this question, we must go back, before this world was created. We must go back to one of the reasons for our life on this Earth.
In Job 38:1-7 we read, "Then the Lord answered Job out of the whirlwind, and said, Who is this that darkeneth counsel by words without knowledge? Gird up now thy loins like a man; for I will demand of thee, and answer thou me. Where wast thou when I laid the foundations of the earth? declare, if thou hast understanding. Who hath laid the measures thereof, if thou knowest? or who hath stretched the line upon it? Whereupon are the foundations thereof fastened? or who laid the corner stone thereof; When the morning stars sang together, and all the sons of God shouted for joy?" God Himself, is speaking of our existence before this world was created. When He created the Earth, all the sons of God shouted for joy. We existed before coming to this Earth.
When we were in heaven, a council was held to discuss our coming to this Earth and how we would make it back to heaven after this earth life is over. The Bible doesn't give us much information concering this event, but what it does tell us is that there was a war in heaven: "And there was war in heaven: Michael and his angels fought against the dragon; and the dragon fought and his angels," Revelations 12:7 What was it that caused the war? What were we fighting about? As part of our church's scripture, we have an account from the book of Moses that talks about this war in heaven. "And I, the Lord God, spake unto Moses, saying: That Satan, whom thou hast commanded in the name of mine Only Begotten, is the same which was from the beginning, and he came before me, saying—Behold, here am I, send me, I will be thy son, and I will redeem all mankind, that one soul shall not be lost, and surely I will do it; wherefore give me thine honor. But, behold, my Beloved Son, which was my Beloved and Chosen from the beginning, said unto me—Father, thy will be done, and the glory be thine forever. Wherefore, because that Satan rebelled against me, and sought to destroy the agency of man, which I, the Lord God, had given him, and also, that I should give unto him mine own power; by the power of mine Only Begotten, I caused that he should be cast down;" Moses 4:1-3 The plan of salvation had been presented. Jesus had offered to come and offer himself as a ransom for our sins. As part of this plan, we would be allowed free agency, the chance to choose for ourselves. Jesus didn't seek this position for glory for Himself, but offered that glory to the Father. Satan, however, had a much different plan. He sought to take away the agency of all men. His plan was to force us to obey the commandments. All he asked in return was that he be given the glory for doing this task. Isaiah also speaks of this event. "How art thou fallen from heaven, O Lucifer, son of the morning! how art thou cut down to the ground, which didst weaken the nations! For thou hast said in thine heart, I will ascend into heaven, I will exalt my throne above the stars of God: I will sit also upon the mount of the congregation, in the sides of the north: I will ascend above the heights of the clouds; I will be like the amost High. Yet thou shalt be brought down to hell, to the sides of the pit." Isaiah 14:12-15
This issue of agency was very important to us all. This life is a sort of testing ground for us. This idea of our needing to "prove" ourselves is common in the scriptures. When the children of Israel were wandering in the wilderness, the Lord said to Moses, "Then said the Lord unto Moses, Behold, I will rain bread from heaven for you; and the people shall go out and gather a certain rate every day, that I may prove them, whether they will walk in my law, or no." Exodus 16:4 So too, this life was given us to prove if we will walk in His law or not, and whether or not we are worthy to live with God again.
I often liken this idea to when I tried to train my dog to stay off the couch. I had decided that because he was so large, and shed so much, I didn't want him to sit on my couches. I taught him to stay off the couches, and if I saw him there, I would reprimand him, and he would slink off to the floor. However, the real "proof" of his obedience was whether or not he would obey when I wasn't around. This is the same type of situation in which we find ourselves here on Earth. God isn't physically present to make sure that we obey. In addition, we have no memory of living with God before this Earth life. This is necessary so that we can develop faith. Will we, when given a choice between what is right, and what is wrong, choose the right? This is the agency offered to us by Jesus Christ in the councils in heaven.
In order for us to have total agency, God must allow us to choose wrong. Unfortunately, there are victims in this process. If God did not allow us to choose wrong, then we could not be fully tested and proved. Often people question why God allows bad things to happen to good people. He allows it because He allows free agency. However what we must keep in mind is that God is just, and those who commit evil in this life, must pay the price at the judgement day. "Rejoice, O young man, in thy youth; and let thy heart cheer thee in the days of thy youth, and walk in the ways of thine heart, and in the sight of thine eyes: but know thou, that for all these things God will bring thee into judgment." Eccl. 11:9 While it is difficult to watch others use their agency to destroy, or to hurt others, it is comforting to know that they will receive judgement for their actions. It is also a blessing to know that we have the free agency to choose for ourselves. We can make of our life what we will.