The story happens like this (Bamidbar 25:3-9)
This seems very interesting because the plague abated for a completely different reason than what G-D had told Moshe. G-D told Moshe that when he hanged "them" (we will see who them is in a minute) then the plague will subside. However, we see that the plague dissipated after Pinchas killed a single sinner. What is going on here. Did the parameters that G-D set forth for the plague to end occur or did they not? In the previous Parsha, Chukas, G-D told Moshe to make a snake and put it on a poll and that would heal anyone affected by the plague of snakes and that is what occurred. However, here it seems like G-D allowed something else to revoke the plague.
Before answering this perturbing question, I think an explanation of who the "them" is in verse 4 is needed. Just to refresh our memories the verse says (Bamidbar 25:4)
|ד וַיֹּאמֶר יְהוָה אֶל-מֹשֶׁה, קַח אֶת-כָּל-רָאשֵׁי הָעָם, וְהוֹקַע אוֹתָם לַיהוָה, נֶגֶד הַשָּׁמֶשׁ; וְיָשֹׁב חֲרוֹן אַף-יְהוָה, מִיִּשְׂרָאֵל.||4 And the LORD said unto Moses: 'Take all the heads of the nation, and hang them up unto the LORD in face of the sun, that the fierce anger of the LORD may turn away from Israel.'|
If we use the second reading, that the heads of the nation (רָאשֵׁי הָעָם) are the ones that G-D commanded to be hanged, I think it is very easy to answer our question of how could the plague abate if the requirements that G-D put in place do not seem to be fulfilled. The answer is simple, these requirements WERE fulfilled!
In order to understand how the requirements of G-D were, indeed, fulfilled we need to understand what the requirements were in the first place. In order to do this we must dissect the verse already quoted (Bamidbar 25:4):
וַיֹּאמֶר יְהוָה אֶל-מֹשֶׁה, קַח אֶת-כָּל-רָאשֵׁי הָעָם, וְהוֹקַע אוֹתָם לַיהוָה, נֶגֶד הַשָּׁמֶשׁ; וְיָשֹׁב חֲרוֹן אַף-יְהוָה, מִיִּשְׂרָאֵל
And the LORD said unto Moses: 'Take all the heads of the nation, and hang them up unto the LORD in face of the sun, that the fierce anger of the LORD may turn away from Israel.'
The main requirement here is that they be hanged "in the face of the sun." Rashi (ibid), as well as a dozen other commentaries, tells us that this expression means that they are to be hanged in public so that everyone will see them. G-D is not requiring Moshe to kill all of the sinners, only the heads of the nation and to display their executions publicly. Why publicly? In order that everyone see that the nation is sinning and that they must stop immediately and only then will the "anger of G-D," manifested as a plague, go away.
The command of G-D was that Moshe was to make a public spectacle that would cause all of the sinners who were worshiping the Baal-peor to stop. Therefore, Moshe must have thought that another approach might work with even less bloodshed as stated in verse (Bamidbar 25:5) says:
ה וַיֹּאמֶר מֹשֶׁה, אֶל-שֹׁפְטֵי יִשְׂרָאֵל: הִרְגוּ אִישׁ אֲנָשָׁיו, הַנִּצְמָדִים לְבַעַל פְּעוֹר. 5
And Moses said unto the judges of Israel: 'Slay ye every one his men that have joined themselves unto the Baal of Peor.'
This command seems to be contrary to the command of G-D. However, if we understand G-D's true command then it is not against G-D's command at all. G-D wanted the plague to end, therefore, He suggested that the quickest and least deadly way to end it would have been to hang the leaders of the nation, but Moshe thought that he could input some invaluable ideas here. It seems to me that Moshe must have thought that if he gave the command to kill all of the worshipers of the Baal-peor then only after a single worshiper was killed or even about to be killed, everyone would do teshuva and beg for forgiveness and there would be little to no bloodshed. The reason I believe this is that, it seems like from the pesukim that no one was killed by the judges. The last verse of the Parsha (Bamidbar 25:9) gives a total number of deaths due to plague, but none due to judges killing. This is in contrast to other places in the Torah where it gave the numbers of people killed. For example, by the sin of the Golden Calf (Eigel Hazav) in Shemos 32:28 it tells us that the Levites killed 3,000 men for worshiping the Golden Calf. If anyone was killed here not by the plague, but by the judges, it should have told us.
The reason G-D did not propose this idea in the first place was because He realized what would happen. Had it not been for Pinchas there would have been much more bloodshed and division in the camp of Israel. Thankfully, Pinchas was able to kill Zimri and Cozbi in such a public fashion that the desired effect took hold and G-D's requirements to end the plague were fulfilled. Everyone immediately realized their sins and turned away from serving the Baal-peor. Once this happened G-D's anger went away and the plague ceased. We can see this from the last few verses in the Parsha (Bamidbar 25:6-9):
ו וְהִנֵּה אִישׁ מִבְּנֵי יִשְׂרָאֵל בָּא, וַיַּקְרֵב אֶל-אֶחָיו אֶת-הַמִּדְיָנִית, לְעֵינֵי מֹשֶׁה, וּלְעֵינֵי כָּל-עֲדַת בְּנֵי-יִשְׂרָאֵל; וְהֵמָּה בֹכִים, פֶּתַח אֹהֶל מוֹעֵד.
And, behold, one of the children of Israel came and brought unto his brethren a Midianitish woman in the sight of Moses, and in the sight of all the congregation of the children of Israel, while they were weeping at the door of the tent of meeting.
Zimri was committing this sin publicly and everyone knew about it. This was the main requirement that G-D gave Moshe: that EVERYONE sees what happens to these sinners.
The most interesting part of this idea comes from the fact that G-D told Moshe to hang the heads of the nation. I could not understand why G-D would kill these, seemingly, innocent people just because some of their followers were sinning. It made me realize something that is true about all types of leadership: if your followers do something wrong it IS your fault. As the Rambam in Hilchot De'os Chapter 6 tells us, "Whoever has the possibility of rebuking sinners and fails to do so is considered responsible for that sin, for he had the opportunity to rebuke the sinner." This is why anyone who is in a position of command is held responsible for what their subordinates do. Whether you are the CEO of a company like BP, the Principal of a school or the Rabbi of a sect of Chassidism, if your followers mess up it is on YOU! This is why one should always enter the role as a leader with fear and trepidation. It is no easy task leading a community, it is hard to convince people that your views are right and that they should follow what you say. However, just like a president is responsible for any misdeeds of his or her country or the general is responsible for his or her army, so too any leader must realize and accept that they have full responsibility and the faults and responsibilities are on them.