And Joshua saved Rahab the harlot alive
From perishing by the sword, as the rest of the inhabitants did. Kimchi says, some interpret it of his giving her food, and an inheritance by which she might live; and Josephus F6 intimates the same: he says, he gave her fields, and had her in great honour and esteem; and it is the notion of some Jewish writers, that he took her to wife, and that this is meant by saving her alive; which sense Kimchi disapproves of, as being foreign; besides, it was not Joshua, but Salmon, a prince in Israel, that married her, ( Matthew 1:5 ) ;
and her father's household, and all she had;
that is, he saved alive all her relations, and it may be her cattle, if she had any; and those of her kindred also, as their sheep, oxen, and asses, when those of others were killed, ( Joshua 6:21 ) . Some also understand this of intermarriages of principal persons in Israel with some of her father's fairly; but it only signifies that their lives were spared, when the whole city was destroyed with the edge of the sword:
and she dwelleth in Israel [even] unto this
which may be meant either personally of Rahab, who was living and dwelt in the land of Canaan, when this history was written; and serves to strengthen the opinion that Joshua was the writer of it, and to explain the meaning of the phrase "unto this day", elsewhere used in this book; and to remove any objection from it against his being the author of it; or else of her dwelling there in her posterity, and so she might dwell in it unto the times of the Messiah, who sprang from her, ( Matthew 1:5 ) ;
because she hid the messengers which Joshua, sent to spy
this was the reason of her and her father's family being saved alive; (See Gill on Joshua 6:17).