Esther 5:8

5:8 If I have found favor in the king’s sight and if the king is inclined to grant my request and perform my petition, let the king and Haman come tomorrow to the banquet that I will prepare for them. At that time I will do as the king wishes.

Esther 5:12-14

5:12 Haman said, “Furthermore, Queen Esther invited only me to accompany the king to the banquet that she prepared! And also tomorrow I am invited along with the king. 5:13 Yet all of this fails to satisfy me so long as I have to see Mordecai the Jew sitting at the king’s gate.”

5:14 Haman’s wife Zeresh and all his friends said to him, “Have a gallows seventy-five feet high built, and in the morning tell the king that Mordecai should be hanged on it. Then go with the king to the banquet contented.”

It seemed like a good idea to Haman, so he had the gallows built.