The passuk states “the Bnei Yisrael were in the desert and they found a man being מקושש עצים on Shabbos.” Onkelos translates מקושש as “when he was collecting wood” which is the melacha of me’amer. The Gemara brings that they warned him to stop and he did not listen. Rashi explains this is derived from the lashon מקושש which is in present tense, “while doing”, and not past tense, “after he did.” The witnesses found him while he was collecting wood and they warned him it is a melacha, yet he continued on. The Nefesh HaGer explains that Onkelos translates the words וימצאו איש מקושש עצים and ויקריבו אותו המצאים אותו מקושש עצים as “when he was collecting wood” to prove and emphasize this point. He was found while gathering wood, and he was warned and did not stop.
Why did this man continue transgressing a melacha on Shabbos after witnesses caught him and warned him?
The Targum Yonason translates: Bnei Yisrael were camping in the desert and the decree of Shabbos became known to them in Marah, however the punishment of Shabbos was not yet known to them. A man stood up from the household of Yosef and said, “I will go and detach twigs on Shabbos, which is the melacha of tolesh, and witnesses will see me and they will tell over to Moshe what happened. Moshe will then ask Hashem which punishment to execute. Then the punishment will become known for all of Bais Yisrael.” We see that his intent of profaning Shabbos was in order to make known its specific punishment.
The question arises, how can one profane Shabbos in order to make it known what is the specific death punishment? The Maharsha answers that he did not do this melacha for the purpose of the melacha. This is called מלאכה שאינה צריכה לגופה. For example if one digs a ditch because he wants the dirt, not because he needs a hole, Rebbi Shimon says he is not liable for doing melacha. Here however, the man is liable for the death penalty since witnesses warned him and he continued on. Beis din was unaware about the intent that was in his heart and couldn’t be lenient when judging.
Tosfos explains Tzelofchad was theמקושש and this episode occurred at the beginning of the forty years in the desert immediately after the story of the spies. The Midrash says he intended l’shem Shamayim. People were saying, “Since there is a decree that we will be in the desert and we will not enter into Eretz Yisrael for the following forty years therefore we are not obligated to perform mitzvos.” He went and profaned Shabbos in order to be killed so that others should learn from this episode to fulfill the mitzvos and fear Hashem. Says the Maharsha, this too is considered a מלאכה שאינה צריכה לגופה, a melacha not for the purpose of the melacha, as he did this to teach people to pay attention to fulfill mitzvos. Although Tzelofchad was killed, his thoughts were l’shem Shamayim to teach the specific punishment of stoning, or to make everyone aware to keep the mitzvos.
Let us all be shomer Shabbos and bring the geula shelaima במהרה בימינו אמן!