Many religions exist in this world. The difference in them vary. One belief most seem to share is a higher being creating the world and in turn creating mankind. Giving mankind ultimate rules of how one should live their life. Also giving us the free will to do what we want. Why? Are we a science experiment? Live this way and be eternally rewarded live the opposite and be eternally damned.. What's the point in creating something set up to ultimately fail..
To understand these things one must know and understand what kind of being God is.
John 17:3
3 And this is life eternal, that they might know thee the only true God, and Jesus Christ, whom thou hast sent.
I will tell you right up front that one of the reason man does not understand the answer to this question is because he has been blinded by one of the great false doctrines in the world. The false doctrine is the belief in ex nihilo creationism. This the belief that God created everything from nothing. It is an absolutely false doctrine nowhere preached in the Bible. The truth is that not only God, but mankind also are eternal beings. There never was a time when you or I did not exist. You are eternal in nature.
Another great principle that one must understand is the nature of free will and its eternal purpose. God is a being of free will. Nobody tells God what to do. He chooses to do good in and of himself. Certainly he wouldn't be God if someone else were controlling him or forcing him to do what he does. There is more joy and happiness in being a person with free will than simply the object of another's will. Joy and Happiness are tied into free will and God is a being having the greatest degree of joy and happiness.
God is a God of love. Havng love in one's life also is key to having joy and happiness. Because God loves us, he wants us to have what he has. He wants us to have greatest amount of joy and happiness. He wants us to be like him.
Matthew 5:48
48 Be ye therefore perfect, even as your Father which is in heaven is perfect.
But we cannot be like God without free will. If God were to force us to be good beings, then we really wouldn't have the free will that brings joy and happiness nor would we be like God who has free will. For God to raise us to become like himself, he must give us free will so that we can learn of ourselve to choose good and overcome evil. Only in this way can we truly become like him. A truly good being is not one who is being forced to do good but one who chooses to be good of his own free will and choice. Only is this way can we truly become like him. Free will is essential to our progression.
We all had free will before coming to this earth. Lucifer (Satan), who was among the children of God chose to rebel against God before we came to this earth. We also had the choice before coming here to follow after God or to follow after Satan. Satan and his followers were cast into the earth and were denied the right to receive a body. Those of us who chose to follow God have come here as the children of Adam and have a mortal body.
Revelation 12:7-11
7 And there was war in heaven: Michael and his angels fought against the dragon; and the dragon fought and his angels,
8 And prevailed not; neither was their place found any more in heaven.
9 And the great dragon was cast out, that old serpent, called the Devil, and Satan, which deceiveth the whole world: he was cast out into the earth, and his angels were cast out with him.
10 And I heard a loud voice saying in heaven, Now is come salvation, and strength, and the kingdom of our God, and the power of his Christ: for the accuser of our brethren is cast down, which accused them before our God day and night.
11 And they overcame him by the blood of the Lamb, and by the word of their testimony; and they loved not their lives unto the death.
In the above verse we read that there was a war in heaven. The war was between the Satan and his angels (followers) and Michael and his angels (followers). Michael and his angels followed the will of God. Verse 11 tells us what became of Michael and his angels. They came to this earth and needed the blood of the Lamb to overcome Satan. They became mortal. The valiant ones overcome Satan by the blood of Christ and they love not their lives unto the death. We see from this that free will was even upheld by God in the premortal life.
One might ask, "Why didn't God just make us perfect?" The answer to this question is that you cannot create that which eternally exists. This is where the false doctrine of ex nihilo creationism comes in. Under such a doctrine one might bring this argument. But when you understand that a part of man has always existed which is that part that thinks and chooses, then you realize that God never created the primal part of man and therefore could not create it to be perfect. This primal part of man is known as intelligence. God took the eternal spirit matter and created a spirit body for us. He later took the dust of the earth and created the body of Adam who was the first man on this earth. He then put the spirit into the physical body and man became a living soul. You cannot create something to be perfect that has always existed. You have to give it free will and then teach it true principles and hope that it learns to choose good over evil.
Do you want to know why there is evil in the world? Because the eternal beings who became spirit children of the Father in heaven are not perfect. Satan and his angels were not perfect and chose to rebel against God. We who kept our first estate in the premortal world are now come to this earth for our second estate. It is here that we are being tested to see if we will choose good over evil and become God like beings.
Free will is pervasive in God's kingdom. Does this mean that God does not keep his kingdom in order but allows all to do whatever they wish without consequence? No, we choose our consequences. God has established different kingdoms for those who reject his word and only those who follow after Christ and receive him by first entering into the waters of baptism and receiving the gift of the Holy Ghost will find their way into the Kingdom of Heaven. But entering into the gate is not the only requirement. They must live a Christ like life and repent of their sins.
Matthew 7:21
21 Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
Because of the imperfect nature of the children of God. God found it necessary to provide a means whereby mankind could repent of their sins and obtain and retain a forgiveness thereof. He did this by providing a Savior for all mankind. If we repent of our sins by forsaking them and turn unto the Lord for forgiveness, He will forgive. Remember that God loves us and wants us to succeed. He knew that because we were imperfect and needed to become more like him through this life's experience and his teachings, that we would need a means whereby we could overcome the justice of the law and obtain mercy for our shortcomings.
John 3:16
16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.