Or HaChaim develops the verse as a praise of Gad for recognizing the significance of the land he chose and for acting with zeal in securing Israel's collective inheritance before his own.
וַיַּרְא רֵאשִׁית לוֹ. פֵּרוּשׁ, הָיָה רָאוּי רֵאשִׁית שֶׁהִיא הַתּוֹרָה לוֹ, וְטַעַם לַדָּבָר – ״כִּי שָׁם חֶלְקַת״, פֵּרוּשׁ חֶלְקוֹ שֶׁל מְחוֹקֵק שֶׁהוּא מֹשֶׁה ״סָפוּן״, אוֹ חֵלֶק מִמְּחוֹקֵק, כִּי חֵלֶק הַגָּדוֹל עָלָה לְמַעְלָה, וְלֹא נִשְׁאַר שָׁם אֶלָּא גּוּפוֹ הַקָּדוֹשׁ הַחַי סָפוּן. וְטַעַם הַדָּבָר לְהָבִיא רָאשֵׁי עָם, כְּאָמְרָם זִכְרוֹנָם לִבְרָכָה (ספרי כאן) לְהָבִיא דּוֹר הַמִּדְבָּר לָעוֹלָם הַבָּא. וְהוּא אָמְרוֹ ״וַיֵּתֵא״ וְגוֹ׳, וּקְרָאָם רָאשֵׁי עָם לְפִי שֶׁהֵם תְּחִלַּת קְנִיַּת יִשְׂרָאֵל לַה׳ לְעַם סְגֻלָּה. עוֹד יִרְצֶה, ״וַיַּרְא רֵאשִׁית״ – הַנַּחֲלָה שֶׁנָּחֲלוּ יִשְׂרָאֵל, שֶׁהִיא אֶרֶץ סִיחוֹן וְעוֹג ״לוֹ״, פֵּרוּשׁ לִטְּלָהּ לְחֶלְקוֹ. וְלַחֲשַׁשׁ סְגֻלַּת הָאָרֶץ שֶׁכָּל הַדָּר בָּהּ אוֹ כָּל הַקָּבוּר בָּהּ יֵשׁ לוֹ חֵלֶק לָעוֹלָם הַבָּא (כתובות קי:), אָמַר טַעַם שֶׁלֹּא חָשׁ לְדָבָר זֶה ״כִּי שָׁם״, פֵּרוּשׁ בַּמָּקוֹם הַהוּא שֶׁלָּקַח לְנַחֲלָתוֹ, שָׁם ״חֶלְקַת מְחֹקֵק״, שֶׁהוּא מֹשֶׁה, ״סָפוּן״, ״וַיֵּתֵא רָאשֵׁי עָם״, וּמֵעַתָּה גַּם הוּא יָבֹא עִם רָאשֵׁי עָם לָעוֹלָם הַבָּא.
וירא ראשית לו. "He chose the first portion for himself." Moses means that actually the ראשית, i.e. the Torah, should have been his share as Moses the lawgiver was buried in his territory. Alternatively, Gad became custodian of a חלק, a small part of the lawgiver, i.e. Moses' earthly remains securely hidden. The reason why Moses was buried there, i.e. on the East Bank of the Jordan was ויתא ראשי עם, in order for the generation of the Exodus, the heads of the nation, to eventually be resurrected together with Moses in order to be allowed to cross the Jordan. The reason that generation is referred to as ראשי עם is that they were the generation whom G'd acquired as His people. Another meaning of the words וירא ראשית לו is that it is a reference to the initial inheritance this tribe took possession of in the lands formerly owned by Sichon and Og. The word לו means that it became his inheritance rightfully. It was not just a land grab. There was a need to confirm this in view of Ketuvot 111 that anyone who lived in the land of Israel or is buried there is assured of a portion of the hereafter. Moses had to confirm that as far as the land of Gad (and Reuven and half the tribe of Menashe) is concerned the same consideration applied. The words כי שם חלקת מחקק ספון mean that just as Moses who is buried in that land will be resurrected so will be the tribe of Gad, or vice versa, i.e. that Moses was not buried in exile.