Note that I am not asking why Moses was punished, but rather why GOD still allowed water to flow from the rock even though Moses disobeyed
In Exodus 17, God commands Moses:
5 'Go on before the people, and take with you some of the elders of Israel. Also take in your hand your rod with which you struck the river, and go. 6 Behold, I will stand before you there on the rock in Horeb; and you shall strike the rock, and water will come out of it, that the people may drink.' and Moses did so in the sight of the elders of Isreal (Exodus 17:5b-6 NKJV).
In this instance, Moses did all The LORD asked of him and all was well, but in Numbers 20 things are different. In Numbers 20, the LORD commands Moses:
Take the rod; you and your brother Aaron gather the congregation together. Speak to the rock before their eyes, and it will yield its water; thus you shall bring water for them out of the rock, and give drink to the congregation and their animals (Numbers 20:8 NKJV).
The text continues to say in verses 9-11:
9 So Moses took the rod from before the LORD as He commanded him. 10 And Moses and Aaron gathered the assembly together before the rock; and he said to them, "Hear now, you rebels! Must we bring water for you out of this rock?" 11 Then Moses lifted his hand and struck the rock twice with his rod; and water came out abundantly, and the congregation and their animals drank. (Numbers 20:9-11 NKJV).
Since Moses directly disobeyed The LORD and did not speak to the rock, but struck it, why did GOD still bless his actions and allow water to "come out abundantly" from the rock? I have tried to do research on this, but the only commentaries I can find speak on Moses' punishment for his infraction on the LORD's commandment.