This source is just one example of how G-d associates the well-being of people with obeying His laws. In this case, the Jewish People are told to behave in an appropriately holy manner. If not, the Land of Israel will not tolerate them, just as it did not tolerate the people who lived there earlier.
אמר שמואל דינא דמלכותא דינא
Shmuel said: The law of the kingdom is the law, i.e., Jews must obey the laws of the state in which they live.
This source is one of four sources mentioned in the Gemara that says in the name of Shmuel (a leading Amoraic authority) that the law of the land where Jews live must be obeyed by Jews. (See worksheet for more details).
(19) you shall do to him as he schemed to do to his fellow. Thus you will sweep out evil from your midst; (20) others will hear and be afraid, and such evil things will not again be done in your midst.
This source is considered to be a source for justice. The most well-known example of this type of justice is eidim zomemim - false witnesses - which involves a person lying under oath in court for the purposes of trying to falsely victimise another person e.g. swearing a person had committed a theft or murder. In this situation, if the witness is found to be false, then the very punishment they wanted inflicted on their victim is imposed on them. This would be a monetary fine in cases of false allegation of theft, and could include a death penalty for false accusations of murder.
(20) Justice, justice shall you pursue, that you may live and inherit the land that the LORD your God is giving you.
(1) צדק צדק תרדף JUSTICE, JUSTICE YOU SHALL PURSUE — go to (search after) a reliable court (2) למען תחיה וירשת THAT YOU MAY LIVE, AND INHERIT [THE LAND WHICH THE LORD YOUR G-D GIVES TO YOU] — The appointment of honest judges is sufficient merit to keep Israel in life and to settle them in security in their land
This is the Torah source for Justice, and Rashi's explanation on it. First, note that it is a positive commandment to go after justice from a reliable court. Second, note that the inheritance of the Land of Israel seems directly related to the establishment of justice. That is how important Justice is seen by G-d.
(14) Seek good and not evil, That you may live, And that the LORD, the G-d of Hosts, May truly be with you, As you think. (15) Hate evil and love good, And establish justice in the gate; Perhaps the LORD, the God of Hosts, Will be gracious to the remnant of Joseph.
The Book of Nevi'im (Prophets) is full of reprimands to the Jewish People for their failure to establish justice. In many passages the people are criticised for following rituals such as sacrifices, but exploiting the vulnerable in society e.g. poor, widows etc. The Prophets constantly say that G-d will not accept the rituals in this instance and will punish the people accordingly. In this passage, from the prophet Amos, a similar warning is given - turn away from evil and establish justice, so that G-d will be with His people.
- Do Not deny G-d (Idolatry)
- Do Not misuse G-d's name
- Do Not murder
- Do Not engage in immoral sexual relationships.
- Do Not steal
- Do Not eat of a live animal
- Establish a Courts/Legal System


