After the demise of Korach and his followers, the Torah tells us that Bnei Yisroel criticized Moshe and Aharon and held them responsible for the deaths of the two hundred and fifty people who were consumed by fire when they offered the ketores. In response to Bnei Yisroel's contemptible behavior, Hashem tells Moshe, "Remove yourself from within the midst of this congregation, and I will annihilate them in a moment" (Bamidbar 17, 10).
The Ramban (ibid.) questions the need for Moshe's separation. We know that the Omnipotent has the ability to wipe out an entire group of people who surround an individual while leaving that individual intact, which, indeed, occurred in Mitzrayim when in each and every house only the firstborn was smitten. If so, why was it necessary for Moshe to distance himself from those around him, when Hashem could have just as well killed them and left Moshe standing alive?
The Ramban answers that once Hashem's wrath had been ignited; everyone would have been killed unless a miracle was to occur to save those who should have been saved. Alternatively, Hashem wished to honor the tzaddikim by letting everyone know that He would not mete out a punishment as long as the tzaddikim were standing amidst the masses. The Ramban asserts, that either way, Hashem's intention in notifying Moshe Rabbeinu of his plans was to convey that Bnei Yisroel desperately needed Divine mercy and pardon, and that he had the power to prevent this catastrophe if he would intercede with prayer.
Rav Wolbe (Shiurei Chumash) cites another place where we find a similar intention behind Hashem's words. After Bnei Yisroel sinned with the golden calf, Hashem tells Moshe, "And now let go of Me, and My anger will flare against them, and I will destroy them" (Shemos 32, 10). Rashi comments that we don't find that Moshe was "holding on" to Hashem, and that being the case, what was Hashem asking of Moshe? Rashi explains that He was letting Moshe know that he could "hold on" to Hashem. If he would pray on their behalf, he would be able to avert the impending catastrophe.
Rav Wolbe continues that Hashem desires all tefillos that are offered on behalf of Bnei Yisroel or in a time of need. They are our protection from strict judgment, and had Moshe not davened in both of the above situations the ramifications would have been unfathomably tragic. Although Hashem did not want these punishments to come to fruition, nevertheless, tefillah was imperative in order to avert the danger.
Unfortunately, there are many things which are in need of our tefillos, whether on a personal or communal level. Hashem is waiting anxiously for our tefillos. One tefillah of Moshe had the ability to save the entire Bnei Yisroel. Why not take a minute to daven for a relative, friend, acquaintance, or even better, for the entire Klal Yisroel. They need the tefillos, Hashem wants them, and we have everything to gain!