When we read the Torah some of its laws disturb our moral sensitivities. When this happens we must remind ourselves of the purpose of the Torah. Not all the laws of Torah represent its ideals. Some of them may even seem to contradict the very ideal that they are serving to empower us to achieve.
The Torah is a system of values arranged in a specific hierarchy, according to their priority for the present in consideration for reaching an ideal in the future. Certain authentic Torah values might be temporarily conceded for the good of the future, even though they may seem to be valuable for the present.
Only G-d can decide which values temporarily overrule other values for the purpose of getting us to where we must go. Only G-d can see the beginning, the end, and the middle of the ethical and spiritual evolution of humanity.
The Talmud states: “G-d says, ‘I created the evil inclination and I created Torah as its antidote.’” The Torah is an antidote to our negative and destructive inclinations. Therefore, the Torah may sometimes appear to be sanctioning some type of amoral behavior, but in fact, it is simply employing a realistic approach in order to empower people to stop doing what they otherwise may not have had the power to overcome on their own.
Take a drug addict, for example. There are two approaches to treating the addiction. One method is cold turkey—just stay off the stuff and go through an excruciating period of withdrawal. The other approach is measured withdrawal, which looks like hospital-sanctioned drug abuse but is really medical intelligence. To wean the addict, the doctors slowly administer, each day, decreasing amounts of the drug until the addiction is gone. If a person who did not know anything about this method walked into the hospital, from his limited perspective he would conclude that this place promotes drug abuse as an ideal.
In the same way, there are Torah laws that do not express the ideals of Torah but exist as a way to reach those ideals. Torah asks us to trust the Creator and Master of time. G-d knows our souls and sets our goals and gives us the guidance to get there.