This parasha describes a grave moral deterioration, when the nation succumbs to their desires and engage in forbidden sexual relations. The leaders of the nation are at the forefront of the sin, but while God commands that the leadership be killed, Moshe only kills those who are engaged in the sinful act. Pinchas fulfills the divine edict by killing one of the leaders of the nation when he has relations publicly. His act is therefore not an act of personal zealousness, but rather a fulfillment of the divine command.