This story begins with children of Israel complaining about not have water to drink. Moses handles the problem correctly by immediately going to the Lord and asking what he should do.
Num 20:7-10 And the LORD spake unto Moses, saying, Take the rod, and gather thou the assembly together, thou, and Aaron thy brother, and speak ye unto the rock before their eyes; and it shall give forth his water, and thou shalt bring forth to them water out of the rock: so thou shalt give the congregation and their beasts drink. And Moses took the rod from before the LORD, as he commanded him. And Moses and Aaron gathered the congregation together before the rock, and he said unto them, Hear now, ye rebels; must we fetch you water out of this rock?
The Lord instructs Moses to take the rod, gather the people together, and speak to the rock. Pretty simple instructions, that Moses should have easily been able to follow.
Num 20:11 And Moses lifted up his hand, and with his rod he smote the rock twice: and the water came out abundantly, and the congregation drank, and their beasts also.
Unfortunately, Moses did not obey the instructions of the Lord. Instead of speaking to the rock, he hit the rock twice with his rod. The Lord did allow the water to come from the rock, but Moses and Aaron still had consequences for their disobedience.
Num 20:12 And the LORD spake unto Moses and Aaron, Because ye believed me not, to sanctify me in the eyes of the children of Israel, therefore ye shall not bring this congregation into the land which I have given them.
Moses did not obey the Lord's instructions even though in the end the desired results were achieved. The consequence for the sin was that Moses and Aaron would not be allowed to enter into the promised land.
Just because the children of Israel got the water that they needed; it did not mean that the Lord approved of the method that Moses used. In fact the disobedience that occurred required a consequence. The Lord told Moses and Aaron the reason that they were punished was because they did not believe the Lord. They did not trust the Lord enough to follow the instructions that they had been given.
How can we apply how the Lord handles Moses and Aaron's sin to our parenting? The Lord gave clear and simple instructions to Moses; do we give our children clear instructions? When Moses disobeyed the Lord's instructions, he did not get away with it. When our children disobey do we let them get away with it just because we got the desired results? Do we expect full and total obedience?