This parsha begins with the statement "Zedek Zedek tirdof leman tichyeh vyarashta et haaretz asher hashem olokeka noten lach"(16:20) Thus telling us to pursue justice above all else.
Most people think the Torah demands of us hesed. While there are many verses proclaiming the importance of hesed, this is really not the principle goal of the Torah.1 Rather it is to do justice. A problem with thinking our goal is to do hesed is that we will end up saying since I don't really have to do it, I won't do it. And then they will even outright cheat people. This is best expressed in the verse from mishley, Tzadaka tromem goy, v'chesed leumim hatat (14:34). Doing justice elevates a nation, but a nation doing hesed leads to corruption.2 A nation needs to be founded on justice not charity. Charity can blur the boundaries between what is mine and what is yours. If what you have was given to you but not earned, then why shouldn't I take it from you? If you have benefits from other people's work, why shouldn't I also take the fruits of other people. Thus hesed can blur boundaries of what is legitimately mine and what isn't.
Justice is a goal which no decent person can honestly say he does not want to achieve. Thus is is not simply cast aside as the concept of hesed can be. A man perceives justice as attainable and so it is better goal, and less likely to be a corrupted goal. Perhaps the biggest cheats think they are baalei hesed. But those who seek justice not hesed will be less often the selfish person.
What is justice? Justice is giving your employer the full work day that he is paying you for. Not spending your work time to surf the Internet or like so many street cleaners, chatting away, smoking, and gernerally not doing the work you are paid for. When a vending machine is broken, justice means not taking the free soda cans, but instead calling the company to have them come get the items that came out in error. Justice means not installing software you did not pay for. It means not starting a charitable organization and then paying yourself a nice salary. Justice means not requesting a handicap sticker when you are not handicaped. And then there is environmental justice. Not wasting the Earth's resources. In short justice means not grabbing every advantage that you can, but instead remembering to do what you would want another in your place to do.
People look at things from their personal perspective and with an eye for what is in their interest. And even when it comes to doing the Torah Law one will interpret things to his own favor. So even following Torah Justice can express itself as cheating the other guy. Can't we always come up with an halachic justification for our crookedness? To really chart the straight and just path is extremely difficult. But there is no denying that it must be your goal. Hesed itself is a bending away from the rules and therefore it can easily lead to bending back the other way and turn into self interest. If I gave a hand out to this poor fellow, why not take some money that isn't really mine from my boss or co-worker. Just as this poor fellow got some money that was undeserved, why shouldn't I?
In the real world, it is perhaps only possible to do what is right if you have a disinterested third party with whom to take advice. This system is spoken about in verse 17:10 -11, the Mitzvah to listen to judges. Verse 9 reads "asher yehiyeh beyamim hahem", why mention this, it is not needed, obviously you the judges you go to will be the ones alive in those times. Can you go to dead judges or future ones? So what the verse is telling you is that even if in your days the judges have no real authority because there is no Sanhedrin, you still should seek out some "Judge", some impartial person to help steer yourself to the straight path. There will always be a judge in your days, and a need to seek them out.
After the discussion of not going to soothsayers and other charlatans who appeal to man's need for certainty but can only offer fraudulent predictions, the Torah concludes, "tamim tehiyeh im hashem elokeka." (18:12) The simple meaning is don't try to know the future, but simply follow God's law. Rambam takes it a step further but in the same vain: One must be perfect in his opinions, deot. Tamim means perfect, not simple. And a major aspect of perfection is not to believe in non-sense. The future is full of uncertainties, but we cannot seek the easy way and look for definite answers from the oracle on the street corner. We have to grapple with decisions. Using Torah as our guide, we need to weigh alternatives and judge conflicting values. Thus the ultimate judge we go to is ourselves. We need to get an impartial opinion but in the end, our life's decisions are in our own hand. Seeking to be just ourselves is our essential task and through it we can create a proper society. Once this has been firmly established then we can develop chesed as an addfixture.
This proper society will have both internal and external peace. Both personal and national peace. The end of the parsha contains a description of that ideal peace. "vehaya im shalom taancha, upatachta lach, v'haya kol haam hanimza ba, yehiyu lecha l'mas vaavaducha" (20:11) Peace means our enemies are no longer enemies, but they serve us.
1. For example, G-d says that the way of the Torah that Abraham's children will keep is to do zadaka and mishpat(genesis 18:19). But there are verses like, Olam hesed yibaneh (Psalms 89:3) Mishaic statements like, Al shlosha devarim haolam omed, al ha Torah al haavoda ve al gemilut hasadim. (avot 1:2)
2. The pshat of the verse is really, Doing justice elevates a nation, and hesed purifies it. But I am here following the interpretation of Chazal who say that the charity of the Gentile nations is sinful. (BT Baba Batra 10b)
Lot learned chesed from Abraham, we see his kindness to the strangers in sdom, offering them shelter while risking his own life. He even offered the townspeople his own daughter. Is it a coincoidence that a man of hesed can be the judge in sdom, a society that was corrupt because it lacked Justice. Perhaps the hesed lead them to feel all property was everyone's. This is the meaning of Chazalk telling us that they would steal each others goods. And that is why the townspeople wanted to know the strangers in Lot's house, Lot must share with them, an act of hesed.
Two of the 13 Midot of G-d are that he is Hesed veEmet. Perhaps only G-d' hesed is uncurrupt, because He conditions it with Emet, truth. He has no self-interest.