According to the Torah, Rosh Ha-shana is only one day: “In the seventh month, on the first day of the month, you shall observe complete rest, a sacred occasion commemorated with loud blasts” (Vayikra 23:24; similarly, Bamidbar 29:1). However, in practice we observe Rosh Ha-shana for two days.
To understand why, we must first grasp that all the holidays hinge on the Hebrew calendar, which is based on the lunar cycle. At the beginning of each month, only a tiny sliver of the moon is visible. It waxes until the middle of the month, when it appears full, a complete circle. During the second half of the month, the moon wanes progressively until, at the end of the month, it is invisible to us for about twenty-four hours. It then once again appears as a tiny sliver, and a new month begins. There is a mitzva, practiced in times past, for those who saw the new moon on the thirtieth night of the month to testify before the supreme beit din, and based on this testimony, the beit din would sanctify the month. Since the moon’s cycle is about twenty-nine and a half days, sometimes a month has twenty-nine days and sometimes thirty. (See Peninei Halakha: Zemanim 1:1-2.)
If there was a holiday during the upcoming month, the beit din would immediately send messengers to all Jewish communities to let them know when the new month began. Based on this, people knew when the holiday would take place. However, because these messengers did not have time to reach distant diaspora communities before the holiday, in those communities there was doubt about its date. Therefore, the Sages ordained that holidays in the diaspora should be celebrated for two days (Peninei Halakha: Festivals 9:1-4).
Rosh Ha-shana is the only holiday that coincides with the beginning of a month. When the beit din sanctified the month, it meant that very day was a holiday. Messengers could not set out to let people know when the month was sanctified, since travel outside of the teḥum was now forbidden. As a result, even in Eretz Yisrael, people did not know when Rosh Ha-shana was declared, so they had to keep two days of Rosh Ha-shana on account of this uncertainty.
In Jerusalem, the seat of the beit din, people knew as soon as the month was sanctified, but they could not know in advance which day would be sanctified, as witnesses were accepted, and the month sanctified, only during the day. Therefore, due to uncertainty, the people had to observe the holiday starting the night of the thirtieth of Elul. If witnesses later arrived (on the thirtieth) and testified that they had seen the new moon, the beit din sanctified the month, and it was clarified retroactively that the day was indeed Rosh Ha-shana. The next day was a weekday. If the witnesses did not arrive on the thirtieth, it became clear that the thirtieth was really a weekday and the holiday would be the next day. Thus, when the beit din sanctified the month on the thirtieth, in Jerusalem the holiday was celebrated for one day; when the new moon was sanctified on the following day, two days were observed even in Jerusalem.
This uncertainty about the date fits well with the hidden, concealed character of Rosh Ha-shana. It is also the reason the holiday comes at a time when the hidden moon is just beginning to appear, which is why it is referred to as keseh. Thus we read, “Blow the horn on the new moon, the covered (keseh) moon, for our festival day” (Tehilim 81:4). Our Sages ask, “During which holiday is the moon covered? It must be Rosh Ha-shana” (Rosh Ha-shana 8a).