Deuteronomy 16:18
Judges and officers shalt thou make thee in all thy gates, which the LORD thy God giveth thee, throughout thy tribes: and they shall judge the people with just judgment. Judges and officers shalt thou make thee in all thy gates, which the LORD thy God giveth thee, throughout thy tribes: and they shall judge the people with just judgment.
Judges and officers were to be appointed in all the gates which the Lord gave, throughout the tribes and in every town, to provide ordered judgment close to the people. Those appointed were to judge the people fairly, with just and righteous judgment. This direction stands together with the surrounding commands to reject distorted judgment and favoritism, to refuse bribes, and to pursue justice.
Just judgment in this command includes dealing justly with widows and fatherless children and refusing bribes. For those entrusted with government it requires equity, protection for strangers, relief for the oppressed, and neither clearing the guilty nor punishing the innocent. Its principles were not for courts alone but were meant to be woven into the life and practice of God's people and their institutions.
The sons of Samuel violated this command by taking bribes and perverting judgment.