R. Yehudah says: Whence is it derived that one is appointed over all? From "shall you appoint for yourself."
And whence is it derived that officers are appointed for every city: From "and officers … in your gates."
And whence is it derived that a beth-din is appointed for each tribe? From "and judges … according to your tribes." And whence is it derived that officers are appointed for each tribe? From "and officers … for your tribes."
R. Shimon b. Gamliel says "according to your tribes, and they shall judge": It is a mitzvah for each tribe to judge itself.