When we consider the word zona, which normally is translated as harlot, we find that Radak indeed translates the word this way, but offers another translation as well – as applying to one who prepares mazon, food, namely, an innkeeper.
Targum Yonatan and Rashi also translate the word zona as innkeeper. Still, Radak explains that pundeka’it, inkeeper, means harlot as well.
We find in Tractate Zevachim (116a-b) the explanation that Rahab was a harlot, as the Gemara explains that the great miracle of the splitting of the sea that G-d performed for His nation was known far and wide to the extent that even Rahab admitted that she had heard of it, as she stated to Joshua’s messengers (Joshua 2:10): “Ki shamanu et asher hovish Hashem et mei yam suf mipneichem betzeit’chem mimitzrayim, va’asher asitem li’shenei malchei ha’emori asher be’ever hayarden le’sichon u’le’og asher hecheramtem otam – For we heard how G-d dried up the waters of the Sea of Reeds before you when you came out of Egypt, and what you have done to the Emorite kings on the far side of the Jordan, Sichon and Og, whom you utterly destroyed.” Rahab continues (ibid.): “Vanishma vayimmas levavenu ve’lo kama od ruach be’ish mipneichem… – And we heard and our hearts melted, neither did there remain any spirit in any man, because of you…”
The Gemara infers that not only were they in great fear, but they even lost their virility. Rahab was intimately aware of this because of the relationships she had with these princes and rulers. The Gemara also relates that she was ten years old at the time of the Exodus, and she conducted her illicit relationships for the 40 years that Israel wandered in the desert. At age 50 she converted, saying, “Let me be forgiven as a reward for the rope, the window, and the flax.” Rashi cites a Mechilta (Parashat Yitro) that explains how she argued: “Let me be forgiven for the three things I have used in sinning.” The three things are the rope which her paramours used to climb up to her, the window they used for entry, and the flax stalks she used to hide them. These same three things served to hide Joshua’s messengers and enabled their escape.
As to the source that she married Joshua, we refer to Tractate Megilla (14b), where R. Nachman states that Hulda the prophetess was a descendant of Joshua, as we see from two verses. One verse referring to Hulda (II Kings 22:14) states, “The son of Har’has,” and another verse (Judges 2:9) states that Joshua was buried in “Timnat-Heres.”
The Gemara now cites an objection to R. Nahman’s interpretation: R. Ena Saba notes that “there were eight prophets who were descended from Rahab – Neriah, Baruch, Serayah, Mahseyah, Jeremiah, Hilkiah, Hanamel and Shalum.” R. Yehuda says that Hulda the prophetess was also a descendant of Rahab, as we see from a verse referring to Hulda (II Kings 22:14), “Hulda the prophetess, the wife of Shalum, son of Tikva (ben tikva),” and a verse (Joshua 2:18) referring to Rahab, “Et tikvat chut hashani – this cord of scarlet thread.” This would indicate that Hulda was Rahab’s descendant, not Joshua’s.
R. Nachman replied, exclaiming, “Ena Saba (some say he addressed him as patya uchma – black bowl – Maharsha ad loc. considers this a compliment), we can deduce from both our statements that Rahab converted and married Joshua.”
The Gemara also concludes that even though we have a Scriptural reference (I Chronicles 7:27), “Non beno, Yehoshua beno – Non [Nun] his son, Joshua his son,” which infers that the genealogy ended with Joshua, who had no descendants. But that applies only to male progeny; he did have daughters from whom Hulda the prophetess is descended.
Before we address your question, there is an even greater difficulty, as we find in Parashat Shoftim (Deuteronomy 20:16): “Rak me’arei ha’amim ha’eleh asher Hashem Elokecha noten lecha nachala lo techayyeh kol neshama – But of the cities of these nations which Hashem your G-d has given to you as an inheritance you shall not leave any soul alive.”
Rambam (Hilchot Melachim 5:4) cites this verse, which refers to the seven nations living in Canaan listed in the Torah, as a command to kill all souls from these nations, and one who has the opportunity and does not do so is in violation of a prohibitory command. In his Sefer HaMitzvot Rambam lists this command as mitzvat lo ta’aseh #49.
Rahab was a member of the Cannanite nation; so how was Joshua allowed to let her live, let alone marry her?
(To be continued)