In parashat Pinehas, we learn of the reward of Pinehas. Pinehas, in his zealous act of retribution, killed a high ranked person in Bnei Yisrael. This individual had sinned in public, even in front of Moshe and Aharon. No one reacted due to sheer shock. This is when Pinehas shinned. He immediately grabbed a spear, and killed both the man and woman involved in the sin.
Pinehas is rewarded with the priesthood, as he was already born when Aharon and his lineage were deemed Kohanim, leaving him out of the loop. But now Pinehas himself would serve in the Mishkan, and his descendants would serve in the Bet Hamiqdash. Specifically we read,
"He and his descendants will have a covenant of a lasting priesthood, because he was zealous for the honor of his God and made atonement for the Israelites." (Numbers 25:13)
It is important to note that there is a Midah Keneged Midah in Pinehas's reward. One may wonder, how does one who murders in zealotry receive a reward to serve in peace in the Mishkan? How are the two connected?
The above-mentioned verse tells us that in his actions, Pinehas atoned for Bnei Yisrael, for Hashem has always vowed, that even if only one individual stands for His mighty morals and standards even in the most trying of times, Bnei Yisrael will be spared. Everyone's inaction was problematic. Yet, Pinehas's action was atonement and saved the nation. Therefore, Hashem rewards Pinehas with the priesthood, and job where he will continue to serve and atone on behalf of the people.
Sometimes we must act in defense of wrong actions.