Those who gather on Shabbat to hear words of Torah testify, through their very gathering, that HaKadosh Baruch Hu created the world.
“And Moshe gathered all the congregation of the Children of Israel and said to them: ‘These are the things that Hashem has commanded to do.’” (Shemot 35:1)
The Midrash says (Yalkut Shimoni, Parashat Vayakhel, remez 408) that this is the only section of the Torah that begins with the expression Vayakhel (ויקהל: ‘and he gathered’). HaKadosh Baruch Hu said to Moshe: “Gather great congregations and teach them the laws of Shabbat, so that future generations may learn from you to gather congregations every Shabbat, in order that My great Name be glorified among them.”
We must understand the meaning of these congregations. It is also necessary to understand why only later generations required such gatherings, as implied by the words of the Midrash, while the generation of Moshe did not.
This can be explained by first introducing what the Tur wrote (Orach Chaim 268): “After the Arvit prayer of Shabbat night, ‘Vaichulu’ is recited again, in order to testify together regarding the work of Creation.” The Taz wrote (ad loc., sub-section 5) that a person praying alone does not repeat “Vaichulu”, because testimony is not valid when given by a single person.
From this, it follows that to give testimony before HaKadosh Baruch Hu a public is required—that is, a full congregation of ten people.
Now, from the words of the Gemara in Tractate Pesachim (51b), it is deduced that when a person abstains from work on Shabbat, it is not necessarily recognized that they do so because of Hashem’s command, for there are many idle people who also do not work. But if everyone gathers in the same place to study or to hear a teaching of Torah, then the significance of Shabbat observance certainly becomes public knowledge. Everyone will see that the gathering takes place specifically on the day when work is forbidden because the Creator so commanded, in remembrance of the work of Creation.
According to this, we understand the importance of gathering congregations on Shabbat: by gathering, everyone testifies together that HaKadosh Baruch Hu created the world. Thus His Name is glorified, for He decreed that no work be done on this day, and they fulfill His will. The honor of Hashem that arises from a large congregation is greater than that which is produced when a person is alone.
However, all of this applies to later generations, who are dispersed and occupied with their work throughout the week. But the generation of Moshe did not need to gather [in this specific way], for they were all already congregated within the camp of Israel, and since their work was performed right there, their gathering was not something that stood out as distinct.
Furthermore, there was already great publicity for the Shabbat due to the fact that the Manna descended every day but did not descend on Shabbat. Therefore, it was not necessary to gather for a teaching for the purpose of making the honor of Shabbat public.
(Zera Shimshon, Parashat Vayakhel, Art. 2)