(יב) וַיֹּ֤אמֶר יְהֹוָה֙ אֶל־מֹשֶׁ֔ה עֲלֵ֛ה אֶל־הַ֥ר הָעֲבָרִ֖ים הַזֶּ֑ה וּרְאֵה֙ אֶת־הָאָ֔רֶץ אֲשֶׁ֥ר נָתַ֖תִּי לִבְנֵ֥י יִשְׂרָאֵֽל׃
(יג) וְרָאִ֣יתָה אֹתָ֔הּ וְנֶאֱסַפְתָּ֥ אֶל־עַמֶּ֖יךָ גַּם־אָ֑תָּה כַּאֲשֶׁ֥ר נֶאֱסַ֖ף אַהֲרֹ֥ן אָחִֽיךָ׃
(יד) כַּאֲשֶׁר֩ מְרִיתֶ֨ם פִּ֜י בְּמִדְבַּר־צִ֗ן בִּמְרִיבַת֙ הָֽעֵדָ֔ה לְהַקְדִּישֵׁ֥נִי בַמַּ֖יִם לְעֵינֵיהֶ֑ם הֵ֛ם מֵֽי־מְרִיבַ֥ת קָדֵ֖שׁ מִדְבַּר־צִֽן׃ {ס}
(12) The LORD said to Moses, “Ascend these heights of Abarim and view the land that I have given to the Israelite people.
(13) When you have seen it, you too shall be gathered to your kin, just as your brother Aaron was.
14) For, in the wilderness of Zin, when the community was contentious, you disobeyed My command to uphold My sanctity in their sight by means of the water.” Those are the Waters of Meribath-kadesh, in the wilderness of Zin.
When did this command happen?
When did Moshe actually go up?
Why is it written here?