Obviously the law against transgressing Shabbat was already well established, but what Moses did not know was the details of the punishment. This was one of four cases in which Moses had to admit, “I do not know what to do”.
One might have thought he deserved credit for deciding that the answer had to come from God Himself. But the Midrash says that God had to teach Moses a lesson.
Moses had told the people that when anything difficult arose, they should bring it to him. God felt that Moses was being egotistical. A good leader should have said, “If anything major arises, report it to me and I will ask God”. God therefore had to warn Moses not to give himself airs.
Who was the man whose action caused the uproar? The Midrash suggests that it was Tzelof’chad, whose daughters complained that their father died without leaving a son; they claimed that in such circumstances they should inherit.
They said that their father died “because of his own sin”, not because of any national disloyalty such as Korach’s rebellion.