Chazal tell us that the man fell in Moshe's merit, the well gave water in Miriam's merit, and the ananei hakavod protected the camp in Aharon's merit. After the death of Miraim, the be'er vanished, but was restored in Moshe's merit; after the death of Aharon the ananei hakavod departed but then returned in Moshe's merit. Apparently Moshe's merit alone must have been sufficient to bring about the be'er and the ananim, otherwise why would they have returned? Yet, if so, why do Chazal attribute their initial appearance to Aharon and Miriam and not exclusively to Moshe?
Chasam Sofer explains that each of these tzadikim, Moshe and Ahraon and Miriam, had a specific task: Moshe taught Torah; Aharon taught how to preserve shalom; Miriam taught yiras shamayim and inspired the women. Moshe's merit alone initially would have be insufficient to bring the ananei hakavod, the be'er, as well as the man. However, after 40 years of absorbing the yirah of Miriam, after 40 years of absorbing the teaching of shalom by Aharon, the people were on a far higher spiritual plane than they were at the start of their journey. Moshe could now even alone could restore the be'er and ananim.
There is a cumulative power to zechuyos. Because earlier generations struggled to achieve the seemingly impossible, we enjoy the benefit of their accomplishments and experience.
I want to mention one other Chasam Sofer because my wife has asked me this in the past. We know what Moshe and Aharon did wrong and why they died in the midbar, but what about Miriam? Why didn't she get to enter Eretz Yisrael?
The C.S. explains that the real reason behind the death of all three of these tzadikim is the sin (obviously slight) of lashon ha'ra. Chazal tell us that evil speech harms the speaker, the listener, and the one about whom it was spoken. It was Miriam's speaking against Moshe, Aharon's overhearing, Moshe being the topic of their gosip, which caused their death. Hashem hoped that the tragic death of these tazdikim would reinforce the lesson for us.
Miriam began the downward slide by speaking against Moshe, undermining the sensitivity of the people to the harm of wrongful speech. Her death caused the removal of the be'er, and created a need for water. Had Moshe and Aharon spoken to the rock instead of striking it, it would have restored the nation's recognition of the power of words. Instead, by hitting the rock, Moshe and Aharon again gave the impression that words alone have no power.
We can now understand why there would never have been a churban had Moshe and Aharon led us into Eretz Yisrael. The churban habayis was caused by the cheit of lashon hara. Because Moshe and Aharon failed to impress upon the nation the power of words, they opened the door to the potential for tragedy. Therefore, they could not be the leaders to bring about a permanent yishuv ha'aretz.