“שׂוֹם תָּשִׂים עָלֶיךָ מֶלֶךְ, אֲשֶׁר יִבְחַר יְהוָה אֱלֹהֶיךָ בּוֹ: מִקֶּרֶב אַחֶיךָ, תָּשִׂים עָלֶיךָ מֶלֶךְ–לֹא תוּכַל לָתֵת עָלֶיךָ אִישׁ נָכְרִי, אֲשֶׁר לֹא-אָחִיךָ הוּא”
“you shall surely set a king over you whom YHVH your God chooses, one from among your brothers you shall set as king over yourselves; you may not put a foreigner over yourselves who is not your brother.”
The code concealed in the first two words of the Torah verse is explained by the Zohar as a precept to accept upon us two courts. A great court from Binah that is called ELOHIM and comes from the Left. This court is the Sanhedrin that has 72 people, 70 judges and two scribes. 72 is the numerical value of the word חסד Chessed. The court operates according to the Light of Chessed that comes from Binah to the Right column, Chessed.
The second court is a small court in Malchut. It represents the Shechina and has three judges, each of them represent one of the three column, Right (Chessed), Left (Gevurah) and Center (Tiferet).
The use of courts is to bring spiritual balance to a spiritually corrupted situation. The decision/verdicts of the court forces a correction upon the people involved in this situation. Without the lower court we will have to die frequently and go through many more reincarnations and or difficult cleansing process after leaving this world. The upper, for major issues, has 72 people to bring the aspect of Chessed into the process.