Mordecai recorded these events and sent letters to all the Jews in all of King Ahasuerus' provinces, both near and far.
[He ordered] them to celebrate the fourteenth and fifteenth days of the month Adar every year
because during those days the Jews got rid of their enemies. That was the month when their sorrow was turned into rejoicing and their mourning into a holiday. They were to be days of feasting, rejoicing, and of sending gifts to one another and the poor.
References for Esther 9:22
So the Jews agreed to continue the practice they had begun, as Mordecai had written them to do.
For Haman son of Hammedatha the Agagite, the enemy of all the Jews, had plotted against the Jews to destroy them. He cast the Pur (that is, the lot) to crush and destroy them.
References for Esther 9:24
But when the matter was brought before the king, he commanded by letter that the evil plan Haman had devised against the Jews return on his own head and that he should be hanged with his sons on the gallows.
For this reason these days are called Purim, from the word Pur. Because of all the instructions in this letter as well as what they had witnessed and what had happened to them,
the Jews bound themselves, their descendants, and all who joined with them [to a commitment] that they would not fail to celebrate these two days each and every year according to the written instructions and according to the time appointed.
These days are remembered and celebrated by every generation, family, province, and city, so that these days of Purim will not lose their significance in Jewish life and their memory will not fade from their descendants.
References for Esther 9:28
Queen Esther daughter of Abihail, along with Mordecai the Jew, wrote this second letter with full authority to confirm the letter about Purim.
References for Esther 9:29
He sent letters with messages of peace and faithfulness to all the Jews who were in the 127 provinces of the kingdom of Ahasuerus,
References for Esther 9:30
in order to confirm these days of Purim at their proper time just as Mordecai the Jew and Queen Esther had established them and just as they had committed themselves and their descendants to the practices of fasting and lamentation.
So Esther's command confirmed these customs of Purim, which were then written into the record.