Shimei's distinction as the ancestor of Israel's redeemer was due to the merits of his wife. When Jonathan and Ahimaaz, David's spies in his war against his son, fled before the myrmidons of Absalom, they found the gate of Shimei's house open. Entering, they concealed themselves in the well. That they escaped detection was due to the ruse of Shimei's pious wife. She quickly transformed the well into a lady's chamber. When Absalom's men came and looked about, they desisted from searching the place, because they reasoned, that men as saintly as Jonathan and Ahimaaz would not have taken refuge in the private apartment of a woman. God determined, that for having rescued two pious men He would reward her with two pious descendants, who should in turn avert the ruin of Israel.
The Unsung Women Behind the Purim Story
Legends of the Jews 12:50