The Torah commands us to be exceedingly joyous during the seven‑day festival of Sukkos. The obligation to rejoice on Shemini Atzeres, the eighth day of the holiday, however, is not stated explicitly. Rather, the Talmud derives this obligation from the extra words stated at the conclusion of the commandment to rejoice on Sukkos, “והיית אך שמח—and you will be only happy.” As Rashi explains, “From here it is derived that the evening of the last day of the festival is included in the obligation of rejoicing.”
The methodology of this Talmudic teaching is unusual. Generally, the Torah’s use of the word אך, “only,” in the context of any particular mitzvah, denotes an exception to the obligation stated there. Yet here the Talmud interprets the words “והיית אך שמח—you will be only happy” as extending the obligation to rejoice on Sukkos to include an additional day—Shemini Atzeres!
In doing so, the Talmud hints that not only should our joy on Shemini Atzeres be equal to our joy on the other holidays, it should truly be exceeded.
How so?
The obligation to rejoice on the festivals has limits. In fact, the religious authorities are obligated to appoint patrolmen on the holidays to see that the drinking and festivities do not get out of control.
Accordingly, the phrase “You will be only happy,” which indicates an exception to the rule, teaches us that there is a holiday when our joy must be excluded from the typical limited joy of the holidays—i.e., our celebration of this holiday must exceed our constrained celebration of the other holidays. Which one? Says the Talmud: Shemini Atzeres.
As such, the custom of hakkafos, dancing with the Torah scrolls, which has no parallel in any other holiday, is observed specifically on Shemini Atzeres (and Simchas Torah, in the Diaspora). For the holiday of Shemini Atzeres is to be celebrated not only in a manner equivalent to the other holidays, but with a joy that is truly boundless.
—Sefer Hasichos 5749, vol. 2, pp. 661–662