Another part of free will. Some actions have consequences for others. As far as how harsh this world is, much of it is the consequences of sin in the world. The reason bad things seem to be spread evenly among the good and the bad is that adversity builds strength. It is through our problems that we gain strength. If nothing bad ever happened to us, we would be weak and unable to relate to those who had gone through tough times. It is said in the Bible that, "All things work together for good in those who love the Lord." In our limited scope, however, we can't always see that. Consider the following analogy:
A veterinarian finds a dog caught in a bear trap. The vet knows that what he needs to do. He needs to get the dog out of the trap, splint the leg, disinfect the wound, bandage the dog, and take the dog back to his clinic for x-rays and further treatment, possibly including a pain-killer. The dog, on the other hand, only knows that every time this vet does something, it hurts...bad. With that limited scope, the dog bites at the vet and the vet must either subdue the dog or give up and let the dog die in the trap. God is the vet and we are the dog, not knowing what the vet knows and just assuming from what we know. However, alter that story a bit. The vet is the dog's owner. The dog still only knows that what the vet is doing hurts. However, the dog knows and trusts the vet and is willing to let him work, knowing that the vet wouldn't intentionally hurt him without a good purpose, so instead of biting, the dog lays back and wimpers while the vet works. This is how Christians should be. I know this firsthand, as I lost a friend in a car wreck last fall. However, 2 people came to know Jesus and a charitable foundation was founded as direct results of this event, and I know for a fact that he went to heaven.