They were tired of wandering in the desert and complained to Moses about the lack of water. The Lord told Moses to take his staff and speak to the rock, then water would come forth for the people. So Moses took the staff from the Lord's presence, just as he commanded him. Then Moses raised his arm and struck the rock twice with his staff. Water gushed out, and the community and their livestock drank.
Anger usually comes as a result of unmet expectations.
I most often get angry when something unexpected deflects me from my agenda. Anger is what we feel when things don't turn out the way we want. The Bible does speak of a righteous anger or indignation, but we probably experience this much less than we might think. God is angry when things are not the way they should be. We are usually angry when things are not the way we want them to be .