Throughout forty years Moses had striven to refrain from harshly addressing the people, knowing that if but a single time he lost patience, God would cause him to die in the desert. On this occasion, however, he was mastered by his rage, and shouted at Israel the words: "O ye madmen, ye stiffnecked ones, that desire to teach their teacher, ye that shoot upon your leaders with your arrows, do ye think that out of this rock that ye have chosen, we shall be able to bring forth water?  I vow that I shall let water flow out of that rock only that I have chosen." He addressed these harsh words not to a few among Israel, but to all the people, for God had brought the miracle to pass that the small space in front of the rock held all Israel. Carried away by anger, Moses still further forgot himself, and instead of speaking to the rock as God had commanded him, he struck a rock chosen by himself.  As Moses had not acted according to God's command, the rock did not at once obey, and sent forth only a few drops of water, so that the mockers cried: "Son of Amram, is this for the sucklings and for them that are weaned from the milk?" Moses now waxed angrier still, and for a second time smote the rock, from which gushed streams so mighty that many of his enemies me their death in the currents, and at the same time water poured out of all the stones and rocks of the desert.  God here upon said to Moses: "Thou and Aaron believed Me not, I forbade you to smite the rock, but thou didst smite it; ye sanctified Me not in the eyes of the children of Israel because ye did not fetch water out of any one of the rocks, as the people wished; ye trespassed against Me when ye said, 'Shall we bring forth water out of this rock?' and ye acted contrary to My command because ye did not speak to the rock as I had bidden ye. I vow, therefore, that 'ye shall not bring this assembly into the land which I have given them,' and not until the Messianic time shall ye two lead Israel to the Holy Land."  God furthermore said to Moses: "Thou shouldst have learned from the life of Ishmael to have greater faith in Me; I bade the well to spring up for him, even though he was only a single human being, on account of the merits of his father Abraham. How much more than hadst thou a right to expect, thou who couldst refer to the merits of the three Patriarchs as well as to the people's own, for they accepted the Torah and obeyed many commandments. Yea, even from thine own experience shouldst thou have drawn greater faith in My will to aid Israel. When in Rephidim thou didst say to Me, 'They be almost ready to stone me,' did not I not reply to thee, 'Why dost thou accuse My children? God with thy rod before the people, and thou shalt smite the rock, and there shall come water out of it.' If I wrought for them miracles such as these when they had not yet accepted the Torah, and did not yet have faith in Me, shouldst thou not have known how much more I would do for them now?" 
God "taketh the wise in their own craftiness." He had long before this decreed that Moses die in the desert, and Moses' offense in Kadesh was only a pretext God employed that He might not seem to be unjust. But He gave to Moses himself the true reason why He did not permit him to enter the promised land, saying: "Would it perchance redound to thy glory if thou wert to lead into the land a new generation after thou hadst led out of Egypt the sixty myriads and buried them in the desert? People would declare that the generation of the desert has no share in future world, therefore stay with them, that at their head thou mayest after the Resurrection enter the promised land."  Moses now said to God: "Thou hast decreed that I die in the desert like the generation of the desert that angered Thee. I implore Thee, write in Thy Torah wherefore I have been thus punished, that future generations may not say I had been like the generations of the desert." God granted this wish, and in several passages of the Scriptures set forth what had really been the offense on account of which Moses had been prohibited from entering the promised land.  It was due only to the transgression at the rock in Kadesh, where Moses failed to sanctify God in the eyes of the children of Israel; and God was sanctified by allowing justice to take its course without respect of persons, and punishing Moses. Hence this place was called Kadesh, "sanctity," and En Mishpat, "fountain of justice," because on this spot judgement was passed upon Moses, and by this sentence God's name was sanctified. 
As water had been the occasion for the punishment of Moses, God did not say that that which He had created on the second day of the creation "was good," for on that day He had created water, and that which brought about Moses' death was not good. 
If the death doomed for Moses upon this occasion was a very severe punishment, entirely out of proportion to his offense, then still more so was the death destined for Aaron at the same time. For he had been guilty of no other offense than that of joining Moses at his transgression, and "who so joins a transgressor, is as bad as the transgressor himself." On this occasion, as usual, Aaron showed his absolute devotion and his faith in God's justice. He might have said, "I have not sinned; why am I to be punished?" but he conquered himself and put up no defense, wherefore Moses greatly praised him.