The location in the plains of Moab, just moments before entering the land, catches the attention of scholars since this setting was already mentioned earlier. The primary approach among commentators is that God speaks to Moses at this specific time, near his death, to comfort him. Moses felt deep sadness and worry. He had worked for forty years to bring the Israelites out of Egypt, yet he would not live to enter the land, conquer it, and divide it. He feared that Joshua alone would be remembered for these achievements. To comfort him, God gives Moses all the commands related to the land right now, including driving out the enemies, setting the borders, dividing the properties, and assigning the cities of refuge and the Levite cities. By having Moses personally deliver these commands, it is considered as if he actually crossed the Jordan River and completed the work Himself, allowing these actions to be credited to him [אברבנאל].
Another source of sadness for Moses involved his own family line, the tribe of Levi. While the rest of the Israelites were about to cross the river and receive their permanent properties, the Levites were not given a lasting land inheritance. God calms Moses by commanding the Israelites to provide the Levites with cities to live in. These cities were to be already built and ready. This ensured the Levites would not have to spend their time building and could instead focus entirely on studying the Torah and teaching the laws to the people. Furthermore, scattering the Levites among all the different tribes helped preserve a sense of brotherhood and prevented them from being disconnected from the rest of the nation [שפתי כהן].
As part of this command, the Israelites were also instructed to give the Levites an open space of one thousand cubits outside each city. This area was meant for their animals and property, again ensuring the Levites remained free to focus on their spiritual studies [שפתי כהן]. Because this open space was specifically designated for their living needs, the dead were not allowed to be buried there [אברבנאל]. Finally, these cities were given to the Levites as a borrowed deposit rather than an absolute property, meaning that if a city were destroyed, the Levites would not be obligated to rebuild it [שפתי כהן].