Actually, I look at it this way:
God uses Earth as a test to confirm which humans are good-natured, and which humans aren't. He knows in advance, indeed, but He wants to see who can see past the wrong information given in the world, and perhaps they'll even change, at which by that point, God becomes aware of that, too. He wants humans to embrace Him naturally and not by force, since is it not better to be loved by will and not involuntarily? Earth is also a contest for the one we know as Satan, or Lucifer. It is said that this Djinn confronted God and refused to regard humans as the better, smarter being, and therefore Lucifer demanded for eternal life as to be given the time to prove to God that His creation is bad at heart. For thousands and thousands of years, Lucifer has influenced human society in a way to contradict God and in an attempt to prove the Creator wrong. His first act was the apple with Adam and Eve; ever since, Lucifer's influence has gripped society in many ways - television, music, etc. The media world has become more and more evidently anti-religious and Lucifer is pleased.
Those who commit sins that God is against are failing His "test". In my opinion, the people who are the victims will be recompensed later in life or in the afterlife, and those who commit such sins will be punished. Originally, these sins did not exist. Sin came to exist when Eve was tricked by the satanic reptile to consume the apple which gave all knowledge. Humans were good and had only knowledge of good in the beginning; after eating the apple, they gained knowledge of bad things, such as rape, murder, etc.
If Heaven was given to everyone, and everyone was forced to love God, Heaven would lose its value. Surely you know the saying "You don't know what you have until it's gone"? Well, likewise, you appreciate the value of things when you don't have it, but want it. If Heaven was given to everyone, no one would realize just how amazing it is.
God knows everything that we'll do, have done, and are presently doing. He sees everything. He doesn't stop some acts, though, because it's part of His "test". I've had horrible things happen to myself and people I've known, and I believe God interferes sometimes to grant karma. He rewards victims who stay strong afterwards, and He condemns those who do terrible, terrible things in their lifetime. I don't mean the little white lie here and there. He won't condemn someone who steals to be able to eat. He'll condemn murderers, rapists, etc. and people who preach against him. He rewards those who are charitable and live in good faith towards fellow man, and thwart the relentless attemps from Satan (or, Shai'tan) that try to change them negatively. It's all based on the intent of the person, and not the action itself. If you mean to do wrong, you will surely be punished. If you do wrong but unintentionally, you will be spared punishment.
This is all just my opinion. It's not a reflection of my religion at its core, but moreso how I've decided to interpret it. I believe the world makes a lot more sense when viewed the way that I see it, but of course, everyone is free to make their own judgments and believe in what they want. I'm just offering my insight on the whole thing.