Pinchas was rewarded because, as the Torah says: HESHIV ET CHAMATI ME’AL BNEI ISRAEL, “…he turned back My wrath from the Children of Israel…”. (Num. 25,11) The Midrash Rabbah comments it is fitting that he should be rewarded. (Num. 21;1)
We know that Chazal taught that rewards are not given by Hashem in this world but in the next. The reason usually given for this is that we do not know how this person will end up later in life. [For the same reason, cities do not usually name streets after living heroes.] Why, then, was Pinchas reward in this world?
There is, however, another teaching of Chazal. They tell us, “Whoever causes a community to do good no sin will come through him”. (Yom. 86a) Since Pinchas prevented the Israelites from sinning further he was assured that he would not go astray in the future. Hence, he could be rewarded in this world.
This demonstrates how commendable it is to have a positive influence on others.