Our Gemara on Amud Aleph tells us about the death of Aharon and its effects:
“And when the Canaanite, the king of Arad, who dwelt in the South, heard tell that Israel came by the way of Atharim; and he fought against Israel” (Numbers 21:1). What report did he hear? He heard that Aaron had died, and that the clouds of glory had withdrawn from the Jewish people, and he thought that he had been granted permission to wage war against the Jewish people. And this is as it is written: “And all the congregation saw that [ki] Aaron was dead, and they wept for Aaron thirty days, all the house of Israel” (Numbers 20:29).
I am going to offer an original interpretation on the connection of Aharon, the Clouds of Glory and the vulnerability to attack that happened subsequent to his death.
Aharon was considered a national treasure because of his efforts to make peace between husband and wife, and man and his fellow countryman. In fact, Rashi in Bamidbar (20:29) quoting Avos D'rabbi Nosson, notes that the verse says “All of Israel” mourned Aharon, while by Moshe’s death it merely says “Israel” (Devarim 34:8). The difference being that the women mourned Aharon’s passing as much as the men, since they equally benefited from his efforts to make shlom bayis. Reishis Chokhma (Gadol Shalom 10) quotes a medrash that in the years of wandering in the wilderness, more than 3,000 children were named Aharon, in gratitude of their parents to Aharon for saving their marriage.
The creation of a stable home and stable relationships is the very reason why Aharon’s merit brought the clouds of Glory. When people behave respectfully and lovingly to each other, then it merits that God also protects and promotes safety and welfare. This is the secret weapon against enemies. When you have internal peace, inside yourself, your marriage, your family and your community, you merit invulnerability to your enemies. This is the real reason why, once Aharon died, the Jews were afraid of being attacked.
I will add another original derash. The verse states (Devarim 20:10):
כִּֽי־תִקְרַ֣ב אֶל־עִ֔יר לְהִלָּחֵ֖ם עָלֶ֑יהָ וְקָרָ֥אתָ אֵלֶ֖יהָ לְשָׁלֽוֹם׃
When you approach a town to attack it, you shall first call out in peace.
The pashut peshat of course is that before going to war with another nation extend a peace offer. However, perhaps we can suggest that specifically at a time of war one needs the extra merit of internal peace and should make peace in their homes and community.