The planned genocide that drives forward the Purim story is seemingly set off by a series of confrontations between Mordechai and Haman. Day after day Mordechai refuses to bow to Haman, but Haman seemingly takes no notice of this. It is only when the king's servants question Mordechai and then pass along whatever he said to Haman that Haman takes notice and becomes infuriated. What did Mordechai say to the King's servants that they passed on to Haman? Taking the Megillah literally, "they told Haman, to see whether Mordecai's words would stand; for he had told them that he was a Jew.". Mordechai's explanation for why he refuses to bow was simply that he was a Jew.
Yet why did this simple fact infuriate Haman to the extent of plotting genocide, and for him to make the statement to his wife and advisers that "Kol zeh einena shoveia li...", "All I have is worth nothing to me whenever I see Mordechai the Jew sitting before the king's gate." An extraordinary and extraordinarily irrational statement for the second greatest man in the Persian Empire to make.
To begin with we need to look at what the middah or nature of Haman and of Amalek is. When Amalek first encounters the Jews leaving Egypt, the phrasing used is "Asher Karcha", a nearly random encounter. Haman's genocidal plan too is random enough to be determined by lots. That middah of pega, of happenstance and randomness is a natural product of a mindset that denies Hashem's role in running the world.
On the other extreme of that middah is that of emunah or faith. Mordechai's refusal to attend the king's feast or to bow before Haman exemplified that middah of faith. The middah of emunah and pega are in permanent conflict, for emunah insists that all comes from G-d and pega insists that all things happen just because they do. That collision of order and chaos was intellectually explosive enough, for when Mordechai insisted on putting faith above obeisance to Haman, he was demonstrating his faith in the worthlessness of everything that Haman had, and in his entire worldview. Therefore Haman would naturally feel when passing Mordechai, that all he had was worthless.
Furthermore Mordechai's emunah was not in anything vague. Instead it was tied in to the specific prophecy that in 70 years the return would come. The 70 years were seemingly here. When Esther prepared to make her request of Ahasverosh, his phrasing was to offer her up to half of the kingdom, barring that which would split apart the kingdom, namely the rebuilding of the Beit Hamikdash. Haman's power was tied to the kingdom, if Mordechai was correct and things did not happen at random but were ruled by a higher power, then he was doomed to lose everything. Naturally when he came across Mordechai passively defying him by refusing to bow, he could not help but feel that all the power he had would pass away, if Mordechai's worldview was correct.
Mordechai's refusal to submit his worldview to Haman's was behind the refusal to bow to him. For Haman did not merely represent political power, he represented the very nullification of faith, the middah of pega. Haman's determination to wipe out not merely Mordechai but the entire Jewish people, rested on his view of their belief in a G-d who was above empires as the ultimate threat to his own power. That collision between these two worldviews would form the events of Purim.