John Calvin's Bible Commentary
Joshua 2:4
4.And the woman took the two men, etc. We may presume that before Rahab was ordered to bring them forth the rumor of their arrival had been spread, and that thus some little time had been given for concealing them. (34) And indeed on receiving the king’s command, had not measures for concealment been well taken, there would have been no room for denial; much less would she have dared to lie so coolly. But after she had thus hidden her guests, as the search would have been difficult, she comes boldly forward and escapes by a crafty answer.
Now, the questions which here arise are, first, Was treachery to her country excusable? Secondly, Could her lie be free from fault? We know that the love of our country, which is as it were our common mother, has been implanted in us by nature. When, therefore, Rahab knew that the object intended was the overthrow of the city in which she had been born and brought up, it seems a detestable act of inhumanity to give her aid and counsel to the spies. It is a puerile evasion to say, that they were not yet avowed enemies, inasmuch as war had not been declared; since it is plain enough that they had conspired the destruction of her fellow-citizens. (35) It was therefore only the knowledge communicated to her mind by God which exempted her from fault, as having been set free from the common rule. Her faith is commended by two Apostles, who at the same time declare, (Hebrews 11:31; James 2:25,) that the service which she rendered to the spies was acceptable to God.
It is not wonderful, then, that when the Lord condescended to transfer a foreign female to his people, and to engraft her into the body of the Church, he separated her from a profane and accursed nation. Therefore, although she had been bound to her countrymen up to that very day, yet when she was adopted into the body of the Church, her new condition was a kind of manumission from the common law by which citizens are bound toward each other. In short, in order to pass by faith to a new people, she behooved to renounce her countrymen. And as in this she only acquiesced in the judgment of God, there was no criminality in abandoning them. (36)
As to the falsehood, we must admit that though it was done for a good purpose, it was not free from fault. For those who hold what is called a dutiful lie (37) to be altogether excusable, do not sufficiently consider how precious truth is in the sight of God. Therefore, although our purpose, be to assist our brethren, to consult for their safety and relieve them, it never can be lawful to lie, because that cannot be right which is contrary to the nature of God. And God is truth. And still the act of Rahab is not devoid of the praise of virtue, although it was not spotlessly pure. For it often happens that while the saints study to hold the right path, they deviate into circuitous courses.
Rebecca (Genesis 27:0. (38)) in procuring the blessing to her son Jacob, follows the prediction. In obedience of this description a pious and praiseworthy zeal is perceived. But it cannot be doubted that in substituting her son Jacob in the place of Esau, she deviated from the path of duty. The crafty proceeding, therefore, so far taints an act which was laudable in itself. And yet the particular fault does not wholly deprive the deed of the merit of holy zeal; for by the kindness of God the fault is suppressed and not taken into account. Rahab also does wrong when she falsely declares that the messengers were gone, and yet the principal action was agreeable to God, because the bad mixed up with the good was not imputed. On the whole, it was the will of God that the spies should be delivered, but he did not approve of saving their life by falsehood.