The following answer was given by Ohr Sameach, "Ask the Rabbi". It gives three reasons as to why Mordechai did not bow. The third reason is an interesting take on the matter. It basically says that the king himself had exempted Mordechai from the command to bow. It explains why Haman had to come up with a totally different reason for killing the Jews. Had Mordechai actually disobeyed a command of the king, Haman could have had him seized and executed. he could also have used it as an excuse to claim that "the Jews" intended to rebel as shown by Mordechai's refusing to obey the king.
PURIM – TO BOW OR NOT TO BOW
This is an intriguing question. Why did Mordechai refuse to bow down
to Haman arousing Haman’s anger and thereby endangering his people?
The Sages explain that Haman intentionally hung an idol over his heart
in order to cause the prostrating Jews to bow in front of the idol
while bowing down to him and thus ensnare them in sin. Since idolatry
is one of the transgressions which one may not commit even under
threat of death, Mordechai refused to bow before Haman’s idol.
However, there is also a deeper reason for Mordechai’s refusal to bow
before Haman. Mordechai descended from Binyamin while Haman descended
from Amalek who came from Esav. Since Binyamin had not yet been born
at the time that Yaakov and his wives bowed in honor before Esav, he
was not tainted by submission to Esav. Therefore, Binyamin’s
descendants, such as Mordechai, do not bow before Esav’s, such as
Haman.
This explanation is alluded to by the fact that the verse describing
Mordechai’s refusal to bow is in the future tense: Rather than saying
“He did not kneel or bow”, the verse actually states, “He will not
kneel or bow down”. This suggests that Mordechai’s refusal was part of
the larger metaphysical dynamic that Binyamin will not bow before
Esav.
The use of the future tense in the verse suggests yet a third reason
why Mordechai would not bow before Haman. As opposed to the beginning
of the verse which says, “And all the king’s servants who were in the
king’s gate kneeled and bowed down to Haman, for thus did the king
command concerning him”, the verse concludes, “and Mordechai will not
kneel or bow down”. This suggests that the entire verse is discussing
the king’s decree, and while others were required to bow before Haman,
Mordechai was, according to the language of the decree, specifically
exempt by the king from bowing.
This would explain why Haman didn’t actually slander Mordechai before
the king for contravening the decree: it did not apply to him. Rather,
he conjured up a different pretext for complaining against the Jews