During the time of the Second Temple, a large Jewish community remained in Babylonia. At first, information about the sanctification of the new moon was conveyed to the Diaspora Jews by means of bonfires, as follows: On the night following the first day when the month could have been sanctified, lookouts would be stationed on mountaintops stretching from Israel to Babylonia. If the beit din sanctified the month, people would ascend the Mount of Olives and light enormous bonfires. They would then wait to confirm that the lookouts at Sartaba (the next station) had lit their torches as well. At Sartaba, they would wait to see that the third mountain had lit torches. Thus, the news was passed along through the night from mountaintop to mountaintop all the way to Babylonia. At some point, the Samaritans (who did not accept the authority of the beit din) started lighting their own bonfires in order to mislead the Diaspora Jews. This ended the bonfire method of notification. From then on, messengers were sent to inform Diaspora Jews about the sanctification of the new month (RH 22b).
In the areas the messengers reached before Sukkot, one day of Yom Tov was celebrated; everywhere they did not reach celebrated two days. It is noteworthy that before Sukkot, the messengers could walk for only ten days, since they did not travel on Rosh Ha-shana, Yom Kippur, or Shabbat. In contrast, before Pesaḥ they could walk for twelve days, because the only time they could not travel was Shabbat. This meant that there were places which the messengers would reach before Pesaḥ, but would not reach before Sukkot. The Sages declared that all the places too far to be reached by messengers before Sukkot should also celebrate two days of Pesaḥ, in order to avoid differentiating between the holidays. Not only that, but they ordained that the seventh day of Pesaḥ as well as Shemini Atzeret should each be celebrated for two days in such places, even though by then the messengers would have reached places which were further away. The Sages even required that Shavu’ot – 50 days after the 16th of Nisan – be kept in all those places for two days. In sum, where the messengers did not reach before the first day of Sukkot, all the holidays would be celebrated for two days (RH 21a).
The exception was Yom Kippur, which was kept for only one day (the first of its two possible days). In other words, Yom Kippur was observed on the day that would be the 10th of Tishrei if Elul turned out to be ḥaser. This is because the vast majority of the time, Elul was indeed 29 days. According to Torah law, we follow the majority. For the same reason, technically one would be obligated to keep a Yom Tov only on the first of its two possible days. It was the Sages who instituted the two-day observance. They themselves decided that since it would be very difficult to fast for two consecutive days, on Yom Kippur we should observe only one day, following the baseline law.