“Because you did not have faith in Me” – that is what the verse said: “There is futility that is performed on the earth, in that there are righteous who receive as accords with the action of the wicked, and there are wicked who receive as accords with the action of the righteous. I said that this too is futility” (Ecclesiastes 8:14). You find when He cursed the serpent and said to it: “Cursed are you…” (Genesis 3:14), He did not allow it to plead anything, as the serpent could have said before the Holy One blessed be He: ‘You said to Adam: Do not eat, and I said to him: Eat. Why are You cursing me?’ He did not allow it to plead anything. Aaron could have said: ‘I did not transgress Your words; why am I being put to death?’
Why Moses and Aaron Were Punished at the Waters of Meribah
Bamidbar Rabbah 19:11