One of the final acts of Moshe before he was to depart from this world was to take vengeance against the Midianites for having aided the Moabites and caused the Israelites to sin in accordance with Bilam’s advice. This is the first place in the Bible where we find vengeance taken. It is not for physical harm or for attacking the Jews. It is for causing them to succumb morally and become ethically corrupt.
Rashi has a major problem in trying to understand this passage.(Num. 31,2) It was the Moabites who were mainly responsible for this corrupt act. Why were the Midianites singled out for this aggression against them?
He answers this by saying that the Moabites may have had a justified cause. They feared the approaching Israelites as we read previous: VAYAGAR MOAV, “And Moav feared…” (Num. 22,3) The Midianites, on the other hand, were not involved and had nothing to fear. They entered the scene merely because of their evil intentions to try to corrupt the Israelites.
We learn that trying to undermine someone ethically and morally is worse than harming them physically. It is a grave wrong when we try to mislead someone and attempt to have them succumb to temptation.