Say No Evil

The episode of Moshe hitting the rock instead of speaking to it is quite puzzling. It seems as though the punishment does not fit the crime. Although as the Midrash states if Moshe would have spoken to the rock the nation would have clearly perceived the greatness and magnitude of Torah