Rahav becomes a prostitute when she is a little girl, due to her family's circumstances. The senior authorities in Jericho all take advantage of her. When the king asks her to give up the spies, she counters the act of a prostitute - giving up one's values for money - with values of hessed and dedication for the greater good. Rahav chooses to join in the ways of Am Yisrael, and according to the midrash ultimately converts to Judaism.

Courtesy of the Virtual Beit Midrash, Yeshivat Har Etzion