This is a question of Free Will. If we did not have it, we could not love God, we would not have self consciousness, we would not truly be His creation. The material world exists as a neutral place in which souls interact with other souls, a place to interact with Creation and be a part of it. It exists for us to know God, to facilitate our growth. It must be neutral to facilitate Free Will. The fact we are privileged to even exist and experience the miracle of consciousness is enough reason for me to praise God.
Being a loving and merciful God, He lets you choose what you want (like any good parent would). You can live your life anyway you want to, however, certain things leave you with any inability to know God. God condemns no one, you choose your path. I kind of see the afterlife as your soul and your relationship with God projected into infinity. In other words, die trying to know God, trying to find Him and you will. If you die denying God then you spend eternity without God, as it is what you wanted. Personally, I believe very few people have this attitude, and I believe upon Death your are given a final choice to try to know God. Our human condition lends us to struggle with this, but if we did not, there is no way we could experience our Creator (He who is, and created everything, God said : I AM, he is the original, eternal existence). Through everything He created we are able to know Him! He is so infinitely great, we cannot simply, literally know God like you know your best friend, He is infinite, and the reason for everything. He created our world as a means for this part of his creation to come to love Him. That is why the central principle of Christianity is Love. Creation is about a reciprocal relationship, thus giving to others lets us gain an understanding of how God works and how He created us... Jesus was sent to teach us this, since we are humans, finite, fallible, and weak, the most important thing we can do is to give of ourselves. Evil essentially exists when one devotes themselves to Self, going completely against what God did for us and who he is. He who let us be able to say "I can experience this! I exist!" in the first place. To not submit to His Will is the ultimate ungratefulness, like taking the most amazing gift and not being thankful for it, going beyond that and utterly abusing it. This is what sin is... Rather than an ever fixed mark or debt to God, it is what separates you from Him.
The problem of sin, leading to temporal and other pain, comes from a deep seated existential problem we have, the universe is not a court of law.
If God were to constantly intervene so there would not be Evil, we would not have freedom of thought or action.
I recommend reading C.S. Lewis's The Problem of Pain in regards to this, this link offers roughly the first half of the book:
Read C.S. Lewis' The Problem of Pain
This is an often asked question.
An Orthodox Christian perspective on the human condition:
The Nature of Things -- And Our Salvation