The king of Jericho sent to Rahab, saying, Bring forth the men who are come to you, who have entered into your house; for they have come to search out all the land.
The general morality of people throughout the world at the times in focus here was very imperfect, even on the part of the Israelites.  Rahab, like the Israelites, is commended in the Word of God, "not for her immorality (adultery and falsehood), but for her FAITH,"[17] and especially for her works in moving to support God's people.  See  Hebrews 11:31 and  James 2:25.