Parashas Vaeira
וַיֹּ֤אמֶר אֵלָיו֙ מֹשֶׁ֔ה כְּצֵאתִי֙ אֶת־הָעִ֔יר אֶפְרֹ֥שׂ אֶת־כַּפַּ֖י אֶל־יְהֹוָ֑ה הַקֹּל֣וֹת יֶחְדָּל֗וּן וְהַבָּרָד֙ לֹ֣א יִֽהְיֶה־ע֔וֹד לְמַ֣עַן תֵּדַ֔ע כִּ֥י לַיהֹוָ֖ה הָאָֽרֶץ׃
Moses said to him, “As I go out of the city, I shall spread out my hands to GOD; the thunder will cease and the hail will fall no more, so that you may know that the earth is GOD’s.
Torah Temimah points to TT / Midrash (verified).
כצאתי את העיר — אבל בתוך העיר לא התפלל, מאי טעמא? מפני שהיתה מלאה עבודת כוכבים.
English: “As I go out of the city” — but within the city he did not pray. Why? Because it was full of idolatry.
Custom
Chazal teach that Moshe would not pray inside a city filled with idolatry.