Mordecai does not uncover the plot by luck.
In the plain scroll, Mordecai learns that two royal officers are planning to strike Ahasuerus, and he tells Esther (Esther 2:22). Targum Sheni on (Esther 2:22) makes the hidden mechanism explicit. The matter is revealed to Mordecai by Ruach HaKodesh.
That single sentence changes the chapter. Mordecai is not merely well positioned at the palace gate. He is spiritually awake inside the machinery of empire. He hears what must be heard before it becomes catastrophe.
The revelation also sets up the later miracle. Mordecai's warning is written in the royal chronicles and forgotten until the exact night when the king cannot sleep. The targum's point is sharp: providence does not begin when the king opens the book. It begins when Mordecai receives knowledge that he could not have known by ordinary means.
Purim moves through hidden channels. Here, one of them opens for a moment.