From In Your Blood, Live (E-2) Rabbi Avigdor Miller
The bayis sheini (second Temple) was very far away from bayis rishon (first Temple) . It was missing many things, it didn’t have the same holiness; the Shechina (Divine Presence) as the bayis rishon, not at all. It was a holy place, but it was a very great decline and therefore Hashem prepared the way for them that they should accept the new way of life that Ezra foresaw for them
The Gemara says “Re’uyoh hoso Torah linasein mei’Ezra — The Torah could have been given in the days of Ezra Hasofer. It was like a new Torah; the same Torah as before but dressed up in a new way that made a tremendous change. So Hashem called in an expert who was capable of making a change, who was able to help out Ezra and that was Haman, he was a great master to whom we owe so much gratitude for what he did for us that even all the prophets together were not able to have to effect on us that Haman had.
Haman was a blessing. There never was such a benefactor to us. All the prophets together did not have such a good influence as Haman . When Achashveirosh took the ring off his finger and put it on the finger of Haman, there was a revolution in the world. Klal Yisroel heard the king’s ring is now on Haman's finger, they turned upside down. It was vunahafoch, the whole nation turned upside down.
The worst enemy, the soirer hayehudim (afflicter of the Jews) now has absolute power over us, it never happened such a thing before...
At that time, when finally when they saw Haman hanging, Haman who had the king’s ring on his finger, and now he’s hanging, that changed it. They came wild, they came crazy, oh, says Hashem now you're ready for a change.
At that moment “kimu vukiblu hayehudim” they accepted “aleihem vu’al zarom” not only that they're going to celebrate Purim every year, they accepted everything and that’s how Ezra’s takanos finally came to be accepted, otherwise it would never happen.