Lately there's been some discussion on this blog about the problem of pain -- the difficulty that human suffering poses for the idea of a just and loving God. But as some commenters have pointed out, pain is a theological problem only if we're talking about a certain kind of God -- one who controls every last detail of our lives. In that case, if you get a bacterial infection and suffer horrible symptoms, it's God's will. Then you have to justify God's will by saying that the pain will teach you a lesson and aid your spiritual progress, or that it's punishment for your misdeeds. Or you give up on rationalizations and say God's ways are unknowable.
Now, there may be some truth to each of these propositions. God's ways may very well be unknowable to limited mortal minds. Perhaps if we attained a higher level of consciousness, we could ward off most illnesses. And certainly suffering can prompt people to learn and grow.
But I don't think any of these answers is entirely satisfactory. The sheer amount of suffering in the world goes far beyond what should be necessity to provide us with learning opportunities. Probably no amount of spiritual development can spare us from all illnesses, natural disasters, human evil, accidents, etc. And God's mind may be unknowable, but if it is utterly alien to our own, then we're hard pressed to see it as a "mind" at all.
Perhaps a simpler explanation is that we're not dealing with that kind of God. There seems to be a large element of randomness in the world. You may have gotten that bacterial infection not as part of any larger plan, but simply because there are countless trillions of toxic bacteria floating around, and by the law of averages, some of them will get into your system and overwhelm its defenses from time to time.
We might speculate that God -- however we understand that word -- monitors everything that happens, essentially recording every smallest detail in a cosmic database. ("The very hairs of your head are all numbered.") But it does not follow that God causes everything to happen, any more than a camera that records a football game is responsible for how the game plays out.
But if God has our best interests at heart, why wouldn't he prevent this suffering? Maybe he can't. There's an old logical paradox: Can God create a boulder too heavy for him to lift? Either a yes or a no answer places a limit on God's omnipotence; either he can't create it or he can't lift it. The usual resolution is that omnipotence does note entail the ability to carry out logical impossibilities. (This, too, limits God's omnipotence - in this case, to what is logically possible.)
Suppose there's also an impossibility entailed in controlling every aspect of the physical world. Instead of lifting a boulder, let's set ourselves the task of rolling a boulder downhill. We could do this by building a machine that picks up the boulder and drops it onto the hillside, and then let gravity do the rest. Or we could (in theory) build a machine that would precisely control every motion of the boulder throughout its descent. Clearly, the second machine would be vastly more elaborate than the first.
Similarly, setting up the universe and letting it run on its own with minimal interference requires a vastly less complex mechanism than running the show on a minute-by-minute basis. If God is powerful but not all-powerful, then he would have to choose certain efficiencies in order to be functional at all.
Whenever efficiencies enter the picture, we are dealing in trade-offs. And this offers another way of looking at the problem. Maybe our imperfect world is the result of certain necessary trade-offs and compromises.
A human body that was impervious to toxic bacteria might be overly efficient at killing off helpful bacteria. To get the benefits of "good" bacteria, you may have to accept the risks of "bad" bacterial infections.
Car manufacturers could make a car so heavily armored that the driver could survive almost any accident. Why don't they? Because such a car would be prohibitively expensive to purchase and operate. Instead, manufacturers seek a trade-off between safety and affordability. Making the car lighter means greater fuel efficiency but less stability in a crash. Making the car heavier improves crash performance at the expense of mileage-per-gallon. There is no perfect solution. Also, as the car gets heavier, it's less maneuverable, making it harder for the driver to avoid a crash. The lighter car may suffer more damage in a collision, but may also be better able to swerve around the obstacle in the first place. Which is preferable? There is no one "right" answer.
Why should a less-than-omnipotent God be any different than a car manufacturer? The trade-offs that come with "building" a universe or an organism are much the same as those that come with building a car. Only if God is unbound by any limitations whatsoever could we expect him to build something that's perfect. If God is limited in any way, then the problem of pain ceases to be a problem and becomes merely a fact in an imperfect world.
It's probably a mistake to think that God could control every sniffle, stubbed toe, and upset stomach of our lives if he really wanted to. More likely, a degree of randomness (and injustice) is simply built into the physical world. As our parents wisely taught us, "Life isn't fair."