The purpose of parties is to fulfill one of the important duties of the day: to publicize the miracle that Hashem performed for the Jews during the events of Purim. Hashem (G-d) turned around the day from anticipated tragedy to victory and joy, and saved all the Jews of the world from annihilation.
Parties are deeply rooted in the Tradition of Purim. Most of the significant events that took place in the Book of Esther happened at parties. King Achashverosh (Ahasueraus) made a party to celebrate the fact that Hashem had not rebuilt the Holy Temple. The Jews attended, and were thus liable for punishment.
But at that party, Hashem also made certain that events would take place that would eventually protect the Jews from their annihilation. At that party, the king had his wife killed, and this resulted in Queen Esther being appointed queen.
Twelve years later, Haman invited the king to a party, and there convinced him to kill all the Jews.
Three days after that, Queen Esther invited the king and Haman to two parties, at which she revealed that she was Jewish and that Haman’s decree would have her and her people killed.
Thus, making parties and drinking wine are strong reminders of the miracle that Hashem did for us.
We must remember that just as Hashem worked on our behalf behind the scenes, we must also keep a part of ourselves under control as well, even as we drink and be merry. We party to celebrate the miracle, not to act with wild abandon.