Rahab is the second woman listed in the genealogy of the lineage of Jesus in Matthew. It is no insignificant thing that Matthew lists five women in the patriarchal lineage of Jesus. There must be a point to it, as patriarchal lineages did not include women, especially in the First Century.
Tamar, the first woman in the list, has a seemingly odd story. She emerges from accusations of prostitution amidst the faithlessness of Judah and wickedness of Judah’s oldest sons to bear the child who would lead to David and ultimately to Jesus. Her creative, if not dutiful, commitment to the custom of bearing a child in honor of her deceased husband redeemed Judah as the bearer of the seed that would lead to the Messiah, in spite of Judah himself.
The Messiah, of course, was promised to come through the line of Judah and later the line of David to be the Savior of the world. This was an extension of the promise to Abraham that his seed would bless all nations. Like Tamar, Rahab is similarly not the picture of one we might assume to be of a messianic lineage.
Rahab wasn’t even of the lineage of Abraham. Her name suggests Egyptian origin, and she was an Amorite, considered an idolatrous, wicked people. If Tamar was only thought to be a prostitute, Rahab was a prostitute.
It doesn’t seem right that Rahab, a prostitute, should be in the lineage of Jesus, let alone included by Matthew as one of only four women listed in the genealogy of Jesus. Some Jewish and Christian scholars have even tried to prove that the Rahab listed in Matthew is not the same Rahab who is identified as a prostitute in Joshua 2.
She lived in the city of Jericho, and she was there when “Joshua fought the battle of Jericho” (as the song goes). Going back in time, however, she took in Joshua and another man when they came to spy out the town.
Recall that God had promised Moses and the people leaving Egypt the land that Abraham was shown many, many years before. Moses was now gone, but Joshua was intent on taking the land God promised. Jericho stood in the way of fulfilling that promise, and Joshua went to spy out the town before they would attempt to enter in to the promised land.
This is where Rahab comes in. She lived in a dwelling on the wall of Jericho where she was engaged in “the oldest profession”, as it is known. When Joshua snuck in the city to check it out, he was noticed and hid in Rahab’s place. She not only took him in; she protected him.
She protected them because she had heard what God did for them in parting the Red Sea, and she said, “I know that the Lord has given you this land …. , for the Lord your God is God in heaven above and on the earth below.” (Joshua 2:9, 11) She asked Joshua to show her kindness for the kindness she showed them by protecting them, and Joshua promised to treat her “kindly and faithfully”
We know the story. Joshua and the Israelites marched around Jericho, blew the trumpets, and the walls came down. Except that Rahab and her family were unharmed. The Israelites spared them before driving all the residents out and burning the city, and Rahab and her family lived with the Israelites thereafter.
We learn in Matthew 1 that Rahab gave birth to Boaz in the lineage of Jesus. Boaz was the father of Obed who was the father of Jesse, and Jesse was the father of David. Years later but long before Jesus was born, the prophet, Isaiah, predicted that the Messiah would come from the “stump of Jesse”.
Rahab is recalled, not for being a prostitute, but for her faith. As with Tamar, God works His perfect will, fulfilling His promise to Abraham, the “father of faith”, through the agency of imperfect people. God also emphasized the importance of women in a largely patriarchal culture and society by expressly including Rahab in the lineage and holding her out as an example of faith.
We remember these things today, as we get ready to celebrate Christmas. We remember that God is faithful, and he keeps His promises to those who trust Him. Though God is the standard of what is good, he freely welcomes and blesses those who trust Him, in spite of sin and failure. God, who became man to live and die for us, freely offers us His righteousness.
“In those days and at that time I will cause a righteous Branch of David to spring forth; and He shall execute justice and righteousness on the earth. In those days Judah will be saved and Jerusalem will dwell in safety; and this is the name by which she will be called: the LORD is our righteousness.” (Jeremiah 33:16)
 A shoot will come up from the stump of Jesse;
from his roots a Branch will bear fruit.
2 The Spirit of the Lord will rest on him—
the Spirit of wisdom and of understanding,
the Spirit of counsel and of might,
the Spirit of the knowledge and fear of the Lord—
3 and he will delight in the fear of the Lord.
He will not judge by what he sees with his eyes,
or decide by what he hears with his ears;
4 but with righteousness he will judge the needy,
with justice he will give decisions for the poor of the earth.
He will strike the earth with the rod of his mouth;
with the breath of his lips he will slay the wicked.
5 Righteousness will be his belt
and faithfulness the sash around his waist.
 Hebrews 11:31; and James 2:25