You know the saying “two rabbis, three opinions?” This is one of them.
Jewish calendars identify months from the new moon; in ancient times, that was when the new moon was seen in Jerusalem. The tradition (actually a rabbinical dictate) of observing for two days was begun to ensure that Jews who lived far from Jerusalem “captured” the entire holiday period since it wasn’t always known on which day the new moon was seen. Jews in Jerusalem always observed for only one day since they were not dependent on guessing what day the month started.
Modern day, some rabbis say that Israelis only need celebrate one day wherever they are since the date of the holiday is known, some rabbis say that you follow the tradition of where you are at the time, and others (reform and some conservative) say that since there is now a fixed Jewish calendar not dependent upon when the new moon is observed, everyone need only observe for one day.
There are some exceptions. Fast days such as Yom Kippur are observed for only one day wherever you are, since the dictate is only to fast from sunset to sunrise.