The following question was once posed in an on-line discussion I participated in, to which I wrote the following answer. I have rewritten the question in a more concise fashion.
Q: Why did God give us the freedom to murder and torture other people? If the purpose of free-will is simply to enable us to freely choose to serve God, then why do we need to be free to behave in truly horrendous ways? Why didn't God restrict our free will to a more morally acceptable range? The only choice that really needs to be left free is the choice to serve God.
A: I have two basic points in response, the first dealing with the nature of the question and the second, more important point, dealing with the underlying premise.
The first point deals with the nature of the concern about human freedom being so broad that it allows us to engage in excessively evil acts. That fact is that the acts that we perceive as atrocities are precisely those that are at the extreme limits of the free will of the normal person. Thus, we see killing a baby - an act that few modern Westerners would do (after childbirth) - as an atrocity, but we see a bar fight as merely bad behavior. No matter where God would have drawn the line for free will, there would remain acts that are so close to that line that they would be perceived as "atrocities". The only possible solution would be to eliminate free will entirely except for the one, yes/no decision to serve God. Such a solution would create a host of problems, not the least being that it would result in a completely black and white moral universe with no gradations at all. You would either be totally good or totally evil.
The second point, which I believe is more important, is that the premise of the question is based on an overly simplified understanding of the purpose for free will. While the idea that freedom gives meaning to our choice to do good is certainly important, and provides the basis for "reward and punishment", it is not the entire story.
On a deeper level, free will is a product of the human "neshama" - "soul/breath" - that God breathes into every human being. It is "the image of God" in which Man has been created. Our purpose in existence is to connect ourselves to God. Such connection is achieved by our emulation of God, bringing our Divine image's potential into actuality. To the degree that we "resemble" God, we are connected to Him. The most basic characteristic of God is that He is "free" - entirely independent. For man to imitate God, to share His image, Man must also be genuinely free.