Did the spies really choose Rahab's house in which to hide from the soldiers, or were they guided there by God, not so much as to save the spies but instead, to save Rahab? In Matthew's gospel's first chapter, there is a list of Jesus' ancestors, and there in verse 5 we read "..Salmon the father of Boaz by Rahab, and Boaz the father of Obed by Ruth, and Obed the father of Jesse and Jesse the father of King David". Firstly, Rahab and Ruth are the only women mentioned and secondly, this commences the line of David from the tribe of Judah, the tribe from which God had promised a Messiah. Rahab was a very distant grandmother of Jesus.
Even before the Promised Land was inhabited by the Hebrews and the royal line of David commenced, God was preserving a family from which he would send a Messiah. Rahab may have been a prostitute by trade but she was no fool when it came to reading the signs of the times. Rahab obviously realised that these men were not clients for she initiated the most amazing conversation with them, telling them " I know that the Lord has given you the land, and that dread of you has fallen on us, and that all the inhabitants of the land melt in fear before you" ( Joshua 2:9). " The Lord your God is indeed God in heaven above and on earth below" ( Joshua 2:10). I would love to have seen the faces of the men when she told them this - this coming from a Gentile whom they would have assumed knew nothing or very little of the God of the Hebrew people.
Rahab saved the spies from the soldiers and now it was time for the spies to ensure that Rahab would be kept safe when the Hebrews invaded Jericho. This of course happened and as the walls of Jericho fell, Rahab's section of the walls remained intact and she and all who were with her were saved.
I love learning something new from a familiar story in the Bible, but who would have guessed the significance of Rahab's actions in saving the spies, and her faith in their God? Never underestimate God's ability to carry out his plans - the actions are his and the timing is his.