Rashi
Jewish
1040–1105
“and what would be done to her He was one of two righteous men to whom a hint of salvation was given: David and Mordecai. David—as it is said (I Sam. 17:36): “Both the lion and the bear has your bondsman smote.” He said [to himself], “This incident happened to me only to teach me to have faith that I can battle with this one [Goliath].” Likewise, Mordecai said [to himself], “The only reason that this righteous woman was taken to the bed of a gentile was because she is destined to arise and save Israel.” He therefore went around to find out what would be her fate.”