ומצא בה איש מסכן וחכם זה יצר טוב ומלט הוא את העיר בחכמתו זו תשובה ומעשים טובים ואדם לא זכר את האיש המסכן ההוא דבשעת יצר הרע לית דמדכר ליה ליצר טוב
<i>Es fand sich darin ein armer Mann und weiser</i>, das ist der gute Trieb. <i>Und rettete die Stadt durch seine Weisheit</i>, das sind Buße und gute Werke. <i>Doch niemand dachte jenes armen Mannes</i>, zur Zeit des bösen Triebes gedenkt niemand des guten Triebes.
Or HaChaim
The Torah was careful to write עליה, which here needs to be translated as "on her account." The idea is that this soul is intended to save the body from the evil urge; it is in line with the verse in Kohelet 9,14 which continues ובא אליה מלך גדול, (the small city) "against which a great king comes and lays siege to it, An insignificant looking wise man saves that small city from the onslaught of the great king using his wisdom" (compare Nedarim 32).