Rabbi Shmuel bar Nachman opened: "But if you do not drive out the inhabitants of the land from before you" (Numbers 33:55). The Holy One, blessed be He, said to Israel: I told you, "you shall utterly destroy them, the Hittite and the Amorite" (Deuteronomy 20:17), and you did not do so. Rather, "and Rahab the harlot and her father's household and all that she had, Joshua kept alive" (Joshua 6:25). Behold, Jeremiah comes from the descendants of Rahab the harlot and makes for you words that are like "pricks in your eyes and thorns in your sides" [cf. Numbers 33:55]. Therefore Scripture requires "The words of Jeremiah" (Jeremiah 1:1).
Thorns in Your Eyes Rahab Spared and Jeremiah Sent
Pesikta DeRav Kahana 13:5
[ה] ר' שמואל בר נחמן פתח אם לא תורישו את יושבי הארץ מפניכם וג' (במדבר לג:נה). אמ' הק' לישר' אני אמרתי לכם כי החרם תחרימם החתי והאמרי (דברים כ:יז), ואתם לא עשיתם כן, אלא ואת רחב הזונה ואת בית אביה ואת כל אשר לה החיה יהושע (יהושע ו:כה), הרי ירמיה בא מבני בניה של רחב הזונה ועוש' לכם דברים של סיכים בעיניכם ולצנינים בצידכם. לפיכך צריך הכת' דברי ירמיהו (ירמיה א:א).