וּמִן־בְּנֵי֩ אֲנָשָׁ֨א טְרִ֜יד וְלִבְבֵ֣הּ ׀ עִם־חֵיוְתָ֣א שוי [שַׁוִּ֗יְו] וְעִם־עֲרָֽדַיָּא֙ מְדוֹרֵ֔הּ עִשְׂבָּ֤א כְתוֹרִין֙ יְטַ֣עֲמוּנֵּ֔הּ וּמִטַּ֥ל שְׁמַיָּ֖א גִּשְׁמֵ֣הּ יִצְטַבַּ֑ע עַ֣ד דִּֽי־יְדַ֗ע דִּֽי־שַׁלִּ֞יט אֱלָהָ֤א עליא [עִלָּאָה֙] בְּמַלְכ֣וּת אֲנָשָׁ֔א וּלְמַן־דִּ֥י יִצְבֵּ֖ה יְהָקֵ֥ים עליה [עֲלַֽהּ׃]
и он был изгнан от сынов человеческих, и сердце его было подобно зверям, и жилище его было с дикими ослами; он питался травой, как волы, и его тело было мокрым от росы небесной; пока он не узнал, что Всевышний Бог правит в Царстве человеческом и что Он устанавливает над ним, кого хочет.
Rabbeinu Bahya
אשר יבחר ה' אל-היך בו, “whom the Lord your G’d will choose.” This verse teaches that in the final analysis both the monarchy and the other lofty positions are all a reflection of the will of heaven. The “election” of which the Torah speaks was decisively influenced by divine forces. This is why our sages in Baba Batra 91 say that even if the king is someone appointed as leader of totally ignorant uncivilised people, he was placed in such a position by an act of G’d. This is also the meaning of Daniel 5,21: “until he knew that the Supreme G’d rules in the kingdom of men and sets over it whom He wishes.”