Some Chassidim come to Moses’ defence and say, “What good would it have done to speak to the rock? Rocks don’t have ears and can’t hear!”
Nonetheless if God tells a person to speak to a rock, surely we don’t have a choice and His command has to be obeyed.
The Chassidim have an answer to this as well. They say it was because Moses loved the people of Israel so much that he did what he did. Had he spoken to the rock it could have been said that if rocks that cannot hear or speak or think can obey God, it would be strange that Israel, people who did have the ability to hear, speak and think, disobey the Divine Master.
It was for the sake of Israel’s reputation and self-respect that Moses changed his orders.