In the mid-9th century, Natronai Ben Hilai Gaon—one of the leading rabbis of Babylonia—answered a query about the origins of the custom of not holding weddings or betrothals in the seven weeks between Passover and the holiday of Shavuot. Natronai explained that this period—known as s’firat ha-omer because of the ritual of counting (s’firah) of the nights between the holidays—is a period of mourning for the students of Rabbi Akiva, who died in a plague during this time of year. Leead Staller explores the development of this custom over the centuries, and discusses an alternate theory of its origins:
According to Moses Naḥmanides (1194–1270), . . . s’firah was originally considered a joyous period for the Jewish people. [In ancient Israel], the grain harvest was bookended by the holidays of Passover and Shavuot. Based on this, Naḥmanides suggests that this entire season was one of celebration of the harvest, beginning with Passover and ending with Shavuot, with the days of s’firah in between being like ḥol ha-mo’ed [the intermediate days of the Passover and Sukkot festivals, during which activities prohibited on the first and last days are permitted] for the extended harvest holiday.
[T]he earliest and most consistent practice of s’firah is that of refraining from hosting weddings during this period. In fact, a restriction against weddings is also characteristic of the celebration of ḥol ha-mo’ed.
The custom was [originally] a natural outgrowth of the joy felt around the harvest season and the associated Temple rituals. But as the Jewish people were exiled, and they lost both their farmland and their Temple, the natural feeling of excitement for the harvest stopped being relevant, and the original cause for celebration was lost. By the time of [Natronai], people were left wondering why we even had these practices in the first place.
Thus . . . without the Temple, the practice of observing s’firat ha-omer as a minor holiday—a ḥol ha-mo’ed for the joy the Jewish people felt during the harvest—was flipped into a custom of mourning for a period of loss.