Rashi explains that the words “Shabbos L’Hashem” mean “L’Shem Hashem,” and notes that these words are also said regarding the mitzvah of Shabbos (Shemos 20:10). Harav Yaakov Yosef Ginz the Rav of Bussermin (Hajdúböszörmény), explained the reason why it is emphasized specifically in these two mitzvos that they should be fulfilled l’Shem Shamayim:
The mitzvah of resting on Shabbos also has a natural reason, because after working the whole week, a person needs to rest. Even the other nations of the world, l’havdil, chose a day for themselves during which they rest from their work.
But as Jews, we are commanded to ignore the natural reason and to keep Shabbos solely l’Shem Hashem. And indeed, while tens of thousands of people were moser neefesh over the generations to keep Shabbos, we never saw a non-Jew be moser nefesh to rest from his work. Because, as noted, they are resting from their work purely for the sake of their body, while we rest on Shabbos to fulfill the commandment of Hashem.
This is the deep significance of the tefillah we say in Minchah on Shabbos: “Your children should recognize and know that their rest is from You, and that they will sanctify Your Name for their rest.” We can recognize and know that the Shabbos rest “is from You” – because of the mitzvah You commanded and not for natural reasons, because “they will sanctify Your Name for their rest.” If their rest was not l’Shem Shamayim they would not be moser nefesh and would not sanctify Your Name to keep it.
The same is true for the rest of the Land. It is customary among farmers that from time to time, they let the land lie fallow because it makes the ground give forth better produce in coming years. Therefore, we were commanded regarding this as well, “Veshavsah ha’aretz Shabbos l’Hashem,” to make the land rest because this is what Hashem commanded, and not for the benefit it brings to the land.
