He is of the line of the Kohen Gadol, charged with handling and protecting the holy things in Israel. When Zimri defied the authority of Moses and the priesthood, and thereby of God, all the people stood at the door of the tent of meeting and wept. It was up to the priest to arise and defend the Torah. A similar issue arose in the career of Messiah, when he took it upon himself to drive the moneychangers out of the temple courts. The root word in both the psalm and in our parasha is qana in Hebrew, meaning to be envious, jealous, or zealous.
Idolatry is the key to our story.
The jealousy or zeal of God arises in the face of idolatry. Zimri's offense is not only sexual immorality, but also the worship of idols that accompanied it. Israel went after not just the Midianite women, but the Ba'al of Peor. Likewise, the moneychangers' offense was not merely greed. Rather, by making the temple of the Lord a place of merchandising, they were worshiping the false god Mammon.