After the destruction of the Second Temple, the Jewish community in Eretz Yisrael became smaller and smaller, while the community in Babylonia grew. Nevertheless, the authority to sanctify the months and to declare leap years remained in the hands of the Sages of Eretz Yisrael. Only on rare occasions, such as the Great Rebellion (66-73 CE), did this change. The situation in Eretz Yisrael then was so horrific, judges who had been ordained in Eretz Yisrael left the country for areas where Jews were not persecuted. There they were able to continue sanctifying the months and declaring leap years.
Over the course of time, the Roman persecutions grew worse. Often their decrees intentionally targeted the Jewish Sages and the mitzva of sanctifying the months. Things deteriorated to such an extent that, at the end of the amoraic period (when Abaye and Rava lived), Hillel II came to the conclusion that it was no longer viable for the beit din in Eretz Yisrael to ordain rabbis and sanctify the months. With the authority vested in him (having inherited the position of nasi, president of the beit din, in a direct line from Rabbi Yehuda Ha-nasi), Hillel II and his beit din calculated the months and years and sanctified them for the long term. Ever since then (4119 in the Jewish calendar, 359 CE in the civil calendar), the Jewish people have kept track of the months and years based on the system set up by Hillel II (Peninei Halakha: Zemanim 1:3 n. 3).
This created a question: Since the fixed calendar was now accessible to all Jews, including those in the Diaspora, there was no longer uncertainty about the correct dates of the holidays. Therefore, it made sense for the Jews of the Diaspora to celebrate only one day of Yom Tov, as was the practice in Eretz Yisrael. The Sages of Eretz Yisrael responded to the Jews of Babylonia with the following ruling: Make sure to follow the custom of your ancestors. For it is possible that at some future time the ruling powers will once again persecute the Jews, leading to uncertainty about the dates. Continuing to celebrate the second day of Yom Tov will ensure that you will never make a mistake (Beitza 4b). We see that the Sages explicitly ordained continuing the custom of the second day of Yom Tov in the Diaspora (MT, Laws of Sanctification of the New Moon 5:5). R. Hai Gaon explains that besides the fear of future persecutions, there is a more fundamental reason to continue celebrating two days: it was the prophets themselves who instituted the second day of Yom Tov in the Diaspora. A later rabbinic court cannot overturn this, because it does not know all the reasons behind their ruling. Additionally, one court’s ruling can be overturned only by a court greater in wisdom and in number than the original court (Otzar Ha-Ge’onim, Yom Tov 4:2).
As with the rest of the Torah, the halakhic reality reflects the spiritual reality. In Eretz Yisrael, holiness is more manifest, and therefore the holiness of the holidays can be absorbed in one day, as the Torah requires. In contrast, those in the Diaspora are further away from the manifestation of holiness, and therefore they need two days to absorb the light of the Yom Tov, as the Sages ordained. This can be compared to a flashlight. When a flashlight is illuminating a nearby location, the light is strong and focused on a small area. In contrast, when it is used to illuminate a distant location, the light is weak and diffused over a larger area. So too, in Eretz Yisrael the light of the holidays is focused and concentrated into one day, while in the Diaspora the light is weaker and diffused over two days (Derekh Mitzvotekha 114:1).