But we are not under the law, we are under grace. God saves us not by our deeds but what Christ has done for us. And Rahab, like us, was saved by God's grace-not by her deeds. Otherwise, Rahab the HARLOT would have had far more issues than a simple lie to deal with. While all her fellow countrymen heard about Israel and wanted to fight them, she wanted to join with the living God. Her lie was covered by the blood of the Lamb.
There is no reason to complain about Rahab's lie as she was unschooled in God's commandments. Think of it more like a young Christian often does things that a more mature Christian would not.
Every situation is different but if Christ could go through the world without sin, and we are to imitate Christ, what should that tell us?
Christ went through the world without sin because He is God.
He fulfilled the law perfectly because no one else could.
We are not to imitate Him, but to allow Him to live His life through us.
Actually, there was nothing in Scripture that stated it was unconditionally wrong and never OK to work on the Sabbath until the Lord taught it could be done in order to save lives, as it was in keeping with the intent of the law . And there is nothing in the scriptures that states that it's unconditionally wrong and never OK to lie in certain circumstances, and instead it shows noble souls lying to evil men in order to save lives, and implicitly sanctions it, as God is shown only rewarding the midwives, Elisha, Rahab, Jael who lied to save souls, and nowhere reproved them.
Why something is wrong to lie must be considered, and thus God can do what would be evil for man to do, without actually violating His law, because He alone can make it work out for the good of those who love Him.