The Torah commands in Parashat Emor (Vayikra 23:21) that we must observe the day of Shabuot as a “Mikra Kodesh” (“sacred occasion”), which the Sages understood to mean that we abstain from Melacha (constructive work).
As the Sefer Ha’hinuch explained in a previous context, the Torah requires us to refrain from Melacha on special occasions in order to enable us to focus our attention on the significance of the events commemorated on each given occasion. In the case of Shabuot, of course, the event is Matan Torah. The prohibition of Melacha on Shabuot ensures that we will not be preoccupied on this day, such that we will be able to contemplate and reflect upon the precious gift which was given to us on this day – the sacred Torah.

