Two Days of Purim
The Megila tells us that both the 14th and the 15th days of Adar are days of "feasting and joy, and sending portions" (Esther 9:22).
But it doesn't state explicitly why and how the holiday is spread over the two days. Thus, the Beit Yosef asks, "Why did they divide this mitzva into distinct days, fixing a distinct day for the unwalled cities and a distinct day for the walled cities, unlike any other mitzva?" (OC 688).
First the Beit Yosef brings the explanation of the Ran. The Ran explains that this is merely an extension of the first Purim, where all over the empire the Jews stood against their enemies on the 13th and rested on the 14th, but in the city of Shushan the Jews stood against their enemies an additional day and rested on the 15th.
Yet according to this explanation Purim should be celebrated on the 15th in Shushan alone, or at the very most in those cities which were walled at the time of the miracle. Why then is Purim celebrated on the 15th in cities which were walled at the time of Yehoshua's conquest, centuries earlier? The Ran answers, according to the Gemara, that to adopt this logical course of action would be an insult to the Land of Israel which then lay in ruins. It would result in Shushan enjoying a special status which Yerushalayim lacks! So in order to rectify this, it was established that the criterion would be which cities were walled in the earlier era. But Shushan itself does retain its special status, since it is the origin of the custom to celebrate on the 15th.
So according to the Ran, the fundamental distinction is between Shushan and the rest of the Persian empire, but as an "afterthought" the practical distinction is based on cities walled at the time of the conquest.
The Beit Yosef objects that the Gemara states that the Megila's reference to "unwalled cities" (Esther 9:19) needs to be understood according to the use of the same word in the Torah (Devarim 3:5), where it refers to the cities unwalled on the eve of our entrance into the land of Israel. Only afterwards does the Gemara ask what then should be the status of Shushan; the conclusion is that due to the circumstances of the Purim miracle, it too should celebrate on the 15th. So according to the Beit Yosef, the fundamental distinction is between walled and unwalled cities at the time of the first entry of Israel into the land; but as an "afterthought" Shushan was added to the cities celebrating on the 15th.
The Beit Yosef suggests that the honor of the Land of Israel was not a secondary consideration determining exactly which cities would celebrate on the 15th but rather the fundamental reason that the holiday is separated into two days. It would have been inappropriate to establish a national holiday lacking an inherent connection to the Land of Israel, especially since the land was then in ruins. The foundational means of creating this connection was by dividing the holiday into two days, one of which is special to Yerushalayim and to a few other cities that were enclosed at the time of the original sanctification of the Land.
Indeed, the Gemara gives a similar reason for the fact that Hallel is not said on Purim since "Hallel is not said on a miracle outside the Land [of Israel]" (Megila 14a).
We can deepen our understanding of this approach by comparing it with a somewhat similar phenomenon of a two-day holiday: the two days of holidays celebrated in the Diaspora. In that case, the real holiday falls on the 15th of the month, a day which "radiates" from Yerushalayim since the Beit Din there establishes the date of Rosh Chodesh. All other locations learn of the date only from Yerushalayim. Places which are far from Yerushalayim, specifically those outside of the Land of Israel, celebrate again on the 16th. (This is true for Pesach and Sukkot, the holidays whose date abroad inherently depends on timely news from Yerushalayim.)
The difference is that in Purim the "distant" cities celebrate first, whereas on Yom Tov they continue their celebration afterwards. This is itself a commemoration of the exile. When the custom of two-day holidays began, there was Jewish settlement in Yerushalayim. Distant residents were reminded by the second day that they were at the periphery of a still-living center. But at the time of the Megila, the center of Jewish life was actually in Persia. The main importance was not to remind Jews where they had been, but rather where they were going. Having the periphery celebrate first suggests the responsibility that existed then to begin the spiritual awakening in the Diaspora, but afterwards to reestablish it as soon as possible in the Land of Israel and Yerushalayim.
The division of Purim into two days, writes the Beit Yosef, is a commemoration of the past. But the fact that on Purim the order is "v'nahafokh hu" (opposite) so that unwalled cities celebrate first and walled ones, including especially Yerushalayim, next is a challenge for the future.