Our Torah portion this week (i.e., parashat Chukat) includes the account of the sin of the great lawgiver of Israel: And God said, "Speak to the rock..." but Moses struck the rock twice with his staff" (Num. 20:8,11). This was Moses' transgression for which his punishment was exile from the Promised Land. The punishment might seem severe, but God intended Moses' actions to be prophetic. When the people first demanded water at Rephidim, Moses was told to strike the rock with his staff (Exod. 17:6). The Hebrew word used to describe how Moses "struck" the rock is the same used to describe how Yeshua was "smitten by God" (Isa. 53:4). The Rock symbolized the Messiah, the One stricken for His people to give them waters of life (Isa 55:1; 1 Cor. 10:4). Moses' act of disobedience implied that rock needed to be stricken again to give life, instead of speaking to it as the "Living Rock." In his frustration, Moses lost sight of the LORD by suggesting that he and Aaron were responsible for the miracle of the water ("listen, you rebels, shall we bring forth water for you?"[Num. 20:10]), and God could not leave those words unanswered before the people. That is why God told Moses that his exile from the land was the result of his sin not sanctifying (i.e., honoring) the LORD before the people of Israel (Num. 20:12).
Note: The sages sometimes expressed dismay that Moses was bereft of seeing his dream come true by entering the Promised Land, but we know that there is a happy ending regarding that point (see Matt. 17:3).