"Each man by his standard, with the ensigns [of their fathers' house, etc. At a distance, around the Tent of Meeting, shall they camp]" (Numbers 2:2). What is the meaning of "at a distance"? Rabbi Isaac said: At a distance of a mile. The Holy One, blessed be He, said: Israel shall be far from the Ark by two thousand cubits, as it is said, "Yet there shall be a distance between you and it of about two thousand cubits, etc." (Joshua 3:4). But Moses and Aaron shall be near to it, as it is said, "And those camping before the Tabernacle [eastward, before the Tent of Meeting toward the sunrise, were Moses and Aaron and his sons, etc.]" (Numbers 3:38). Why were Moses and Aaron near to it? Rather, the Holy One, blessed be He, said: If I become angry with My children, they shall make a reconciliation between Me and My children. Therefore they were near to it. But the tribes "at a distance, around the Tent of Meeting, shall they camp."
Why Moses and Aaron Camped Closest to the Tent of Meeting
Midrash Tanchuma Buber, Bamidbar 16:1
איש על דגלו באותות [וגו'. מנגד סביב לאהל מועד יחנו]. מהו מנגד, אמר ר' יצחק מרחוק מיל, אמר הקב"ה יהיו ישראל רחוקים מן הארון אלפים אמה, שנאמר אך רחוק יהיה ביניכם וביניו כאלפים אמה וגו' (יהושע ג ד), ומשה ואהרן יהיו סמוכים לו, שנאמר והחונים לפני המשכן [קדמה לפני אהל מועד מזרחה משה ואהרן ובניו וגו' (במדבר ג לח), למה היה משה ואהרן סמוכים לון, אלא אמר הקב"ה אם כעסתי על בני, יהיו עושין פשרה ביני ובין בני, לכך היו סמוכים לו. אבל השבטים מנגד סביב לאהל מועד יחנו.