Apparently basing itself on the idea that King here refers to H-Shem, the Midrash (Esther Rabbah 7:1) cites a verse in Tehillim (37:20) to relate that H-Shem allowed for Haman to be elevated only in order for his fall to be all-the-more steep and painful. There is a parable told there of a horse, a donkey, and a pig. The farmer feeds the donkey and horse a limited amount, and feeds the pig without measure. One day, the horse asks the donkey, “We do actual work, yet are fed less. This is not fair!” The wise donkey tells the horse to be patient and realize that the pig is not well-fed for its own good, but to be fattened up to be eaten by the farmer.
In the next Midrash (ibid. 7:2) a story is told of a king who felt it beneath his dignity to kill a peasant, so he promotes him in order to execute him without degrading himself. Such is the case with Haman, made great only to be cut down the more painfully.
The Chida calculates that Haman was at the peak of his power for a total of seventy days. He sent out the letters to kill the Jews on the 13th of Nisan. Seventy days later, on the 23rd of Sivan, Mordechai sent out the letters for the Jews to rescue themselves. Similarly, there are seventy verses between this verse where Haman is elevated and the verse where Haman is hanged (7:10).
The Ginzei HaMelech writes that, by elevating Haman, H-Shem was rewarding him for his advice to rid the world of the evil Vashti.
According to Rav Dovid Feinstein, Haman was elevated at this point as a consequence for King Shaul’s (Mordechai and Esther’s ancestor) misdirected kindness in keeping Agag (Haman’s ancestor) alive.
Tanna D’vei Eliyahu (21) writes that Haman’s elevation is a reward for Agag’s sincere prayer when he was locked up in prison, awaiting his death. Because of this evil man’s last prayer, a ruler was destined to come from him, as is alluded to in the verse (Bamidbar 24:7), “and He raised from Agag his kingship.” Based on this, the Ginzei HaMelech asks, how could Haman, a thoroughly evil man only in power for 70 days, be considered a reward? He answers that the Talmud (Sanhedrin 96b) teaches that Haman’s grandchildren learn Torah in Bnei Brak, truly a reward for anybody.
The Maharal writes that Haman is rewarded here instead of Mordechai because the righteous generally are not rewarded with wealth in this world, but accrue reward in the World to Come.
Rav Shmuel Aharon Rubin cites Rav Nachman bar Yitzchak in the Talmud (Megillah 11a), who applies the verse in Tehillim (124:2) that discusses H-Shem rescuing us from a man to the Purim story. Since kings have not free will of their own, he continues, H-Shem needed to elevate a man – since free will is the mark of humanity – to this position from which he could threaten the Jewish people. It is a bigger miracle that Pesach in that way because Pharaoh’s heart was Divinely hardened. Haman, on the other hand, could make his own decisions, and chose evil all the same.
The Vilna Gaon tells us that if Haman is Memuchan (as asserted before), the human king had reason to reward him, as well. After all, it was Haman who advised that Vashti should be removed. First, this advice allowed the king to marry Esther. Second, Esther helped save the king’s life from the assassination plot of Bigsan and Seresh (Esther 2:21).
But if the motivation to elevate Haman came from Achashverosh for this, why did he not reward Mordechai? The Tirosh Vayitz’har writes that Achashverosh was unsure about Mordechai’s intention. Perhaps he was a part of the plot, after all. The only one he was sure of was Esther, so he rewarded her by elevating the man whose advice led to her being queen.
Rabbi Shlomo Kluger writes that, after surviving the assassination attempt, Achashverosh realized that he was at risk – especially from Haman – and knew that he needed to keep him close by. As the old saying goes, “keep your friends close, and your enemies closer.”
This is the exact opposite view from Chacham Tzvi, whose opinion is that Achashverosh mistrusted Haman and thought he conspired together with Esther to kill him. However, once Esther reported the assassination plot in Mordechai’s name – Mordechai being Haman’s arch rival – Achashverosh (thought he) knew that Haman was loyal.
According to the Malbim, the king simply forgot about Mordechai completely.
Rabbi Yehonasan Eibshutz notes that it makes little logical sense for Mordechai to have been so passed over, and instead condemned to die along with the other Jews. After all, he saved the king’s life when he had no need to. Therefore, this verse is yet another proof that it is impossible to understand the Purim story – or even Jewish history, in general – without the understanding that H-Shem miraculously protects His beloved people.