Rahab did a good deed. In fact she did several of them in this story. She befriended Joshua's spies who had come to check on the land that God had promised them, she gave them a place for the night, and she hid them from those the King of Jericho sent to torture and kill them. In an unprecedented way she put her own life and the lives of her family on the line to help two strangers. That's noble.
But Jesus is better...much better. Rahab did her good deeds and those works helped a great many people, but she did them for a favor. "Ill help you if you help me." In our world, that's still noble, but what Jesus did in his life and works was and still is more noble. He showed use true picture of selfless love rather than self preserving wisdom. Jesus was meeting the needs of others without expecting anything in return.
Remember when ten lepers appealed to Jesus for help and he healed them all? Do you remember how only one returned to thank Jesus? Did Jesus get bitter toward the ungrateful? No. Did He hold back from healing people after that? Absolutely not. Praise God that He is generous to the selfish and faithful even when we are not!!! Because this is our God, and He has us, we can do good and not worry about the outcome.