In this portion, the Israelites complain that they have no water. Hashem tells Moses to order a rock to give water. Because in a previous episode, Hashem told Moses to hit the rock with his rod, Moses did so again. Hashem told Moses that he forfeited the right to enter Canaan with his people.
Rambam says that Moses’ sin was not hitting the rock, but rather that he lost control of his anger and called the Israelites “rebellious.” Losing control over one’s anger is a serious violation, which the Talmud equates with idolatry.
We cannot help feeling anger when provoked, but we should at all times avoid going into rage. The Talmud says that when a person is in rage, one’s judgment is distorted, and “all the forces of hell dominate him.”
I a letter to his son, Ramban counsels him to avoid rage, because controlling one’s anger leads to development of fine character traits.