Strangers appearing in a small, heavily guarded city immediately raise deep suspicion. Despite their attempts to blend in, the Israelite visitors were quickly exposed, and their true purpose was reported to the local leadership. The primary approach among commentators is that the men came to spy and search. Just as a person digs into the earth to uncover what is buried, these men arrived to unearth the hidden secrets of the land [רש״י, מצודת ציון]. More specifically, their task was not just general reconnaissance but a deep investigation into one specific location—the city of Jericho itself [מצודת ציון]—to extract hidden intelligence and understand the thoughts of the local people [מלבי״ם].
How was their cover blown so quickly? Beyond simply standing out as foreigners in the local landscape [ביאור שטיינזלץ], their behavior gave them away. They entered a city under strict lockdown and arrived under the cover of darkness, rather than waiting outside the gates until morning like ordinary merchants [מלבי״ם]. Alternatively, a more critical perspective suggests that their very choice to seek shelter in an inn or brothel, rather than remaining out in the open streets or fields, is what directly led to their immediate discovery [אברבנאל].
The way this intelligence was reported to the king of Jericho reveals a layer of political complexity. The informant was afraid to explicitly name Rahab, as she was a highly connected and influential figure among the regional rulers. Instead, he used careful, cunning language, stating only in general terms that men had come to search the land. However, the king immediately read between the lines. He understood that the only way spies could gather intelligence about the entire region from a single private residence was by visiting Rahab, who was intimately familiar with the government's secrets [אלשיך]. Consequently, the king demanded that she hand the men over. It did not matter whether they had come to her for prostitution or merely for a place to sleep; their true, dangerous objective was espionage [אברבנאל, צאינה וראינה].
The specific timing of their arrival at night carried a double significance. First, it served as clear proof to the locals that these men were not innocent travelers [מלבי״ם]. Second, it presented a tactical and spiritual opportunity. The informants urged the king to strike against the Israelites specifically during the night. They believed that God's spirit does not rest upon the prophets of Israel in the dark, making the night the one crucial window of opportunity to overpower them before dawn [אהבת יהונתן].