"And you shall speak to the rock before their eyes, and it shall give its waters" (Numbers 20:8). That it should give its waters, and it will give them, so that they may draw a kal va-chomer (an inference from minor to major) upon themselves, saying: Just as this rock, which has no punishment and no reward, performed the command of the Creator, we — how much more so!
The Rock That Obeyed God and Israel's Kal Va-Chomer
Midrash Aggadah, Numbers 20:8
ודברתם אל הסלע לעיניהם ונתן מימיו. שיתן מימיו והוא יתן כדי שישאו קל וחומר בעצמם לומר מה סלע זה שאין לו עונש ולא שכר עשה ציווי הבורא, אנו לא כל שכן: