Why the book of Esther was included in the bible seems a mystery at first until certain aspects are brought to mind about it. It was a wedding of a devout but captured Jew, Hadassah, to a gentile King and the emergence of a plot to commit genocide upon the Jews; a forerunner, if you will, to an early or perhaps the first Anti-Christ, a seed of Satan the devil planted as a "tare" in God's road to paradise.
In establishing a subjugating role for Queen Vashti in the protocol in this book it shows an early attempt the Persians had to establish rules for the role and the lack of authority women held and still do in that part of the world. The rest of the bible does establish worth and counters this persian early attempt to demean women who stand up for what is right according to bible principles, not necessarily for modern standards as the two often differ today.
So why was Esther written? The answer is that God inspired it thru the Author and I do not know who the Author was other than God. God is not mentioned nor prayer only fasting and no spiritual services but is included because of its hidden teaching of an overshadowing providence (promise of God) that is mentioned in the Old Testament. Had Haman succeeded the Jewish line could have been destroyed making God's promise to Israel a lie and we know that God and God's word cannot lie. The Author was surely of Jewish descent and likely captive in Persia just before it fell at the time of Queen Esther (Hadassah). I believe that Mordecai wrote it or at the very least supplied the record it was based upon but of couse sourced by God himself. The promise of Ex 17.14 seems to hold a significant clue as to why Esther was written as well as why so much detail was included to make it read more closely to a modern novel than a Book of the Old Testament. Exodus 17:14 (KJV) 14 And the LORD said unto Moses, Write this for a memorial in a book, and rehearse it in the ears of Joshua: for I will utterly put out the remembrance of Amalek from under heaven. Just my personal thoughts on this subject written by Thomas S Smith 28 January 2008, Monday