הָבוּ לָכֶם אֲנָשִׁים חֲכָמִים וּנְבֹנִים וִידֻעִים לְשִׁבְטֵיכֶם וַאֲשִׂימֵם בְּרָאשֵׁיכֶם
Prepare for yourselves wise and understanding men, known among your tribes, and I will make them heads over you.
The first chapter of the book of Deuteronomy details the march towards the conquering of the Land of Israel. In this verse, the theme abruptly changes to a conversation that took place between Moses and Bnei Yisrael regarding the appointment of judges and the institution of a system of justice. In this verse, Moses asked the people for recommendations as to who might be the most appropriate candidates for the judgeship; he later gave the newly appointed judges instructions on how to act in their positions, emphasizing to the nation as a whole the importance of following the Torah when they enter the land. Only after these instructions did the march towards the Land of Israel resume.
Moses interrupted his narrative with this seemingly tangential point because the prerequisite for entry into the Land of Israel was the institution of a perfect system of justice (see commentary on Haftarah of Parashas Devarim). This sequence provides the blueprint for the coming Messianic redemption as well, and this historical precedent is the rationale for the sequence of blessings in our daily Shemoneh Esrei. After initially laying out our individual needs, such as forgiveness, health and sustenance, the Shemoneh Esrei addresses itself to Israel’s communal redemption. After the request for the ingathering of the exiles in the blessing of Teka Beshofar, it would have been logical to transition immediately to the blessings of Velirushalayim Ircha and Es Tzemach David, requesting that the Temple be rebuilt and that Messianic rule be implemented. However, as soon as we mention the ingathering of the exiles, we cannot make these additional requests until a system of perfect justice is established—to defeat those who oppose it and request the triumph of those who are righteous in justice. Only after that can we ask that the Temple be rebuilt and the Messiah arrive. (Yarchei Kallah, 1978)