"The Jewish people wept..." (Deut. 34:8)

When Aaron’s death is reported, the Torah wrote that "the whole house of Israel wept for thirty days." (Numbers 20:29) Our Sages in Avot de Rabbi Natan (122) claim that Aaron’s having been a lover of peace was the reason he was mourned even more than Moses when he died.

...they had been informed well in advance that Moses was about to die.

Perhaps we may understand the difference in the people’s reaction to the two deaths as stemming from the fact that Aaron’s death was unexpected whereas they had been informed well in advance that Moses was about to die. The sudden realization that Aaron had died had a more profound effect on the people. Moses had told the people for six weeks running, during all his exhortations, that he was approaching his death. (Compare Deut. 4:22) No wonder that they did not react as profoundly at the time Moses was eulogized as at the time Aaron was eulogized.

Another possible reason for the difference in the reported reaction of the people was due to the immediate visible effects of Aaron’s death such as the disappearance of the protective clouds which had hovered over the encampment of the Israelites ever since the Exodus. Their disappearance had been followed immediately with an attack by the Canaanites as explained. (Taanit 3) These factors combined to stir the entire nation into weeping at Aaron’s death. When Moses died they did not experience such negative fallout; on the contrary, they knew the way was clear to cross the Jordan and take possession of the land of Canaan.

...immediately after Moses died, the Shechinah settled on Joshua.

Still another possibility to explain this relatively muted reaction by the Jewish people to Moses’ death was the fact that immediately after Moses died, the Shechinah settled on Joshua. The people took comfort from this fact. This may be compared to someone who has lost a bag of precious stones, but has found some pearls instead. Although he mourns the loss of the stones, he does not do so with the same intensity as he would have done had he not found the pearls. This is why not all of the people wept at Moses’ death. This is also the reason that the report of the people weeping for the death of Moses is followed immediately by the report that Joshua was filled with a spirit of wisdom, etc.

When Aaron died, this was equivalent to the loss of diamonds which had not been replaced by other precious stones. Even though Elazar was appointed as High Priest in his father’s stead, they did not weep for the absence of a High Priest but for the loss of something which was irreplaceable, i.e. the benefits of Aaron’s presence had bestowed upon them.

[Selected with permission from the five-volume English edition of "Ohr HaChaim: the Torah Commentary of Rabbi Chaim Ben Attar" by Eliyahu Munk, Vol.1]