She lied for a couple reasons. One she believed God and two she got a promised reward so her lie was both self serving and obedient to God's will for the Israelites.
Berlin Bear's example is also an example of two motivations in lying. Those who hid Jews lied to save the Jews and themselves. Have you read any of Corrie Ten Boom’s books? She and her sister ended up in a concentration camp for assisting Jews.
If it is acceptable to lie to save a life is it acceptable to murder to save a life? I am not talking about self-defense, but a premeditated murder like the Christian who murdered the abortionist to prevent the murder of the unborn?