It states (Esther 1:21) מְמוּכָן כִּדְבַר הַמֶּלֶ ךְ וַיַּעַשׂ. The Beis Aharon (p.69a) explains this to mean as follows: הַמֶּלֶ ךְ וַיַּעַשׂ, Hashem will do מְמוּכָן כִּדְבַר, in accordance with how the person prepared himself for the holiday. It is known that when one prepares himself for a yom tov or for a mitzvah, the kedushah of the good deeds, and the השפעות, bounty that Hashem gives us, increase immensely.
About Matan Torah Chazal (Shabbos 88a) teach: "(Shemos 19:17) ההר בתחתית ויתיצבו, 'They stood at the bottom of the mountain.' This tells us that Hakadosh Baruch Hu raised the mountain [Har Sinai] above them, as if it were a barrel, and Hashem said to the nation, 'If you accept the Torah, it will be good. Otherwise, you will be buried there.' Rava bar Acha said ... לאורייתא רבה מודעה מכאן, 'From this the nation can claim that they were forced to receive the Torah!'
Rashi explains that if they don’t keep the Torah, the nation now has an excuse. Rashi writes, "If they will be brought to judgment, 'Why didn't you keep the Torah that you accepted?' They have an answer. They can say that they were forced to receive the Torah."
The Gemara continues, קבלוה הדר כן פי על אף אחשורש בימי, 'Nevertheless, they received the Torah again in the days of Achashveirosh, as it states (Esther 9:27) קימו ,היהודים וקבלו קימו, they accepted, כבר שקיבלו מה, the Torah that they had already received.'"
Rashi writes, אחשורוש בימי, "In Achashveirosh's time [they received the Torah again] due to their love of the miracle that happened to them." They can no longer claim that they were forced to keep the Torah because they accepted the Torah with love. This occurred in the days of Mordechai and Esther.
There is an aspect of matan Torah on Purim, too. On Shavuos, we received the Torah out of fear, and on Purim, we receive the Torah again, from love. Before Shavuos, we have three days for preparation (the ימי שלשת הגבלה). Rebbe Yitzchak of Vorka zt'l says that similarly, before Purim, we have three days to prepare. As the Mishnah states at the beginning of Masechta Megillah (2a), מ ְגִלָּה ,עָשָׂר בְּא ַרְבָּעָה ,עָשָׂר ָׁהבִּש ְׁלֹש ,עָשָׂר בִּש ְׁנֵים ,עָשָׂר בְּאַחַד נִקְר ֵאת עָשָׂר ָּׁהבַּחֲמִש, "The megillah is read on the days: 11, 12, 13, 14, and 15 [of Adar]." Today, we don't read the Megillah on the 11th, 12th, and 13th of Adar, only on the 14th and 15th. Nevertheless, the 11th, 12th, and 13th remain special days. They are like the הגבלה ימי שלשת, the three days we prepare for matan Torah. We prepare for the matan Torah of Purim, and for the mitzvos that we will perform when Purim arrives. The preparations will elevate the mitzvos to higher levels, and we will receive many spiritual and gashmiyus blessings.
Therefore, it is good to prepare for Purim. We can do this by studying about the holiday and the mitzvos, and we can increase our yearning and aspirations, and we can daven that we should succeed in performing the mitzvos properly.
Nevertheless, Hashem knows the hardships of the times. People don't have yishuv hadaas; they don't have time, and it is hard to prepare properly for Purim. Therefore, Hashem has compassion for us, and even without preparation, Hashem gives us immense bounty.
Another indication to this concept is from Shulchan Aruch (694:3). It states, לוֹ נוֹת ְנִים לִט ֹּל יָדוֹ ֵׁטשֶׁפ ּוֹש מִי כָּל. The literal meaning of this halachah is that when someone says, "I don’t have money to prepare a Purim seudah", we give him money without investigating whether his claim is true or not. We can also read the phrase רמז בדרך, that the phrase is hinting at the following idea: לִט ֹּל יָדוֹ ֵׁטשֶׁפ ּוֹש מִי כָּל, whoever stretches out his hands in prayer, and asks his Father in heaven for salvation, לוֹ נוֹת ְנִים ...יָדוֹ, Heaven gives him a hand. This means that even if he didn't prepare a vessel with which to receive Hashem's bounty, לוֹ נוֹת ְנִים ...יָדוֹ, Hashem gives him a hand and a vessel, so that he should be able to receive the bounty and the salvation that Hashem desires to shower on him.
The Chofetz Chaim zt'l told a mashal of an oil merchant who came to a village. The villagers brought their empty vessels to him. One brought a jug, one brought a pot, etc., and the merchant filled the vessels with oil. Eventually, the villagers ran out of vessels. The merchant said, "You want to buy more oil, and I want to sell it to you, but if you don't have vessels to receive it, I have no way to give it to you." This mashal describes the importance of preparing for a yom tov, and for Purim. Hashem wants to give gashmiyus and ruchniyus, and we want to receive, but we need vessels to receive the spiritual and worldly goods. Each step we take in our preparation for Purim prepares another jug, another container to receive Hashem's bounty that He wants to give us. Nevertheless, as we wrote, Hashem has compassion on us, and if we didn't prepare, Hashem gives us a vessel so that we can receive the bounty of the holiday.
On Purim, when one gives mishloach manos, he gives the dish, too. During the year, when one gives a gift to another person, he wants the container back. (Perhaps not in our generation, when people use plastic dishes and containers, but going back to the days when a gift was placed in a glass or silver container, the giver expected to receive the container back.) However, with mishloach manos, the container is also given, together with the gift. This hints that on Purim, when Hashem gives us bounty, He gives it together with the vessel, which means that even if a person didn't prepare for Purim, he doesn't have anywhere to place Hashem's bounty, it’s not a problem, because Hashem will give us the bounty together with the container.
When the miracle of Purim occurred, the Jewish nation wasn’t worthy. They weren't at a high level due to their aveiros, as Chazal tell us. Nevertheless, Hashem saved them. Therefore, we shouldn't be surprised, Hashem will perform miracles for us, too, on Purim, even if we didn't prepare, even if we have aveiros, and even if we aren't worthy.
The Chasam Sofer (Drashos) quotes from Chazal that Haman's gezeiros were decreed after the Jewish nation had aveiros. They had bowed down to Nevuchadnezzar’s avodah zarah, and they partook in Achashveirosh's seudah. Heaven agreed that Haman's decree of annihilation was fitting for them, r'l. Nevertheless, Hashem saved them and performed miracles for them. This is actually one of the great miracles of Purim that the salvation came despite their aveiros.
Vashti was killed at Achashveirosh's meal, and her vacancy made place for Esther to come and save the nation. The Chasam Sofer points out that at the time of the aveirah (eating at Achashveirosh's feast), Hashem was already preparing the stages for the salvation of Bnei Yisrael! This was an amazing kindness and miracle.
Hashem saved us from Haman and from Achashveirosh, not because we were worthy, but rather because of His love and compassion for us. The Chasam Sofer teaches that therefore, Shulchan Aruch (694:3) tells us,אֵין לוֹ נוֹת ְנִים לִט ֹּל יָדוֹ ֵׁטשֶׁפ ּוֹש מִי כָּל א ֶלָּא פּוּרִים בְּמ ָעוֹת מְדַק ְדְּק ִים, "We aren't cautious [where to give] tzedakah for Purim. Whoever puts out his hand to receive, we give to him." We aren't particular as to where we give tzedakah. Everyone can receive. The Chasam Sofer says that just as Hashem wasn’t picky with us, and He saved us although we weren't worthy, we also aren't particular with others, and we help whoever puts out his hand for assistance. We understand from this that even if we didn't prepare for this holy day, as we should have, Hashem will have compassion on us and perform miracles for us, as He did in the days of Mordechai and Esther.
The Midrash says, "Even if all the yomim tovim will cease to exist, Purim will continue to be, because it states יַע ַבְ רוּ לֹא הָא ֵלֶּה הַפ ּוּרִים וִימֵי מ ִזַּרְעָם יָסוּף לֹא וְזִכְרָם הַיְּהוּדִים מִת ּ וֹךְ, "These days of Purim should never cease among Yidden, nor shall their remembrance perish from their descendants."
This is a surprising Midrash. Why should the yomim tovim cease to exist? Isn't the Torah forever?
Someone asked this question to the Rashba, and the Rashba wrote this question in his teshuvos (Teshuvos HaRashba vol.1 teshuvah 93): "Why would one think that something from the Torah will ever cease? Not one letter, and not the ד"יו של קוצו, drop of the letter yud [will ever change from the Torah]!"
The Rashba replies that due to sin, it is possible that the yomim tovim might end. As it states (Eichah 2:6) ׁ ַבָּתוְש מוֹעֵד בְּצִיּוֹן 'ה ש ִׁכַּח, "Hashem made Tzion oblivious of yom tov and Shabbos..." But regarding Purim, Hashem promised that (9:28) מ ִזַּרְעָם יָסוּף לֹא וְזִכְרָם הַיְּהוּדִים מִת ּ וֹךְ יַע ַבְ רוּ לֹא, "These days of Purim should never cease among the Yidden, nor shall their remembrance perish from their descendants." Purim will be forever, in all generations.
We understand from this that no aveirah will ever make us unworthy of Purim. So, certainly, we should prepare for Purim, and the more we prepare, the better. But even when we aren't worthy, Purim will be for us. Miracles and salvations will occur, as they did in the past.