As the spirit children of God, we lived with God before coming to this earth. Those of us who stayed the course and believed and loved God while in his presence were allowed to come to this earth and receive bodies. There were those who did not stay the course and rebelled against God in our pre-mortal existence. They were cast out of heaven into this earth. There came a time when mankind were to be tested to see if they would follow after truth and goodness by simply hearing about it and having faith in it. I like Ding's post #2 where we were to exercise our freewill. Having a veil placed over our minds so that we cannot recall our prior existence with God, we were given the opportunity to choose good over evil as a principle more so than being in his presence and knowing of a surety that he exists. God wants us to learn to be good in and of ourselves. He wants us to do good for goodness sake and not simply because he exists. The concept of God is a representation of goodness and righteousness. It is a representation of love, justice, peace, selflessness, etc. etc. How much better of a person would we be if we were good beings because we believe in goodness and all that God represents rather than seeing God and doing good because he is there.
Those of us who have children know that when we are in their presence, they don't do much wrong. But when we are not there, how do they act? Do they still do what you would want them to do or do they do something else? There is an old saying, "When the cat's away the mice will play". At some point we need to grow further spiritually and start becoming a good being of our own volition. This earth life is just that. God is testing us to see what we will do without a perfect knowledge of his existence and to see if we will become good beings in and of ourselves. This earth life is a time for us to grow more spiritual than we were when we lived in his presence. We need to learn to walk by faith and put on the breastplate of righteousness and pick up the shield of truth and goodness and incorporate that into our very own characters. This is how God is helping us to become more like him.
John 20:26-29
26 And after eight days again his disciples were within, and Thomas with them: then came Jesus, the doors being shut, and stood in the midst, and said, Peace be unto you.
27 Then saith he to Thomas, Reach hither thy finger, and behold my hands; and reach hither thy hand, and thrust it into my side: and be not faithless, but believing.
28 And Thomas answered and said unto him, My Lord and my God.
29 Jesus saith unto him, Thomas, because thou hast seen me, thou hast believed: blessed are they that have not seen, and yet have believed.