There has been for centuries a misunderstanding of the purpose of the law. People still insist that the law was given by God to be kept by man and thereby establishing through earning favor through a holy life a relationship with God. This is NOT the purpose of the law which Paul establishes in Romans 3.

In Romans 4, Paul uses two Old Testament characters to make his case that only faith can access the grace of God and bring us into right-standing (righteousness) with God. The first person Paul discusses is Abraham. There are still people today that believe that Abraham was justified by God because of his holy life. Because of Abraham’s holy life, they argue, Abe performed his way into friendship with God. Anyone who believes that just isn’t reading his / her Bible carefully. If fact, you have to ignore major portions of the Bible to conclude that Abraham was a holy man and therefore earned his way into right-standing with God.

Abraham was married to his half-sister which according to the law given hundreds of years later was taboo. In order to save his own neck, Abraham gave his wife away to an Egyptian Pharaoh not once but twice. (Genesis 12:11-18 and 20:1-2) Only God kept Sarah safe from committing adultery. Abraham also caved in to his wife’s demand to have sex with Hagar. (Genesis 16:3-4) In so doing, Abe impregnated his wife’s servant girl and had a baby by her whose name was Ishmael. Now I don’t know about you but that kind of behavior wouldn’t fly very well in my home! Certainly it is not “holy” behavior in God’s eyes. Abraham had a few serious problems and they are clearly recorded in Genesis.

But this is what Paul says in Romans 4:1-5 What then shall we say was gained by Abraham, our forefather according to the flesh? For if Abraham was justified by works, he has something to boast about, but not before God. For what does the Scripture say? “Abraham believed God, and it was counted to him as righteousness.”
 Now to the one who works, his wages are not counted as a gift but as his due. And to the one who does not work but believes in him who justifies the ungodly, his faith is counted as righteousness… Romans 4:13-17 For the promise to Abraham and his offspring that he would be heir of the world did not come through the law but through the righteousness of faith.14 For if it is the adherents of the law who are to be the heirs, faith is null and the promise is void. 15 For the law brings wrath, but where there is no law there is no transgression. 16 That is why it depends on faith, in order that the promise may rest on grace and be guaranteed to all his offspring—not only to the adherent of the law but also to the one who shares the faith of Abraham, who is the father of us all,17 as it is written, “I have made you the father of many nations”—in the presence of the God in whom he believed, who gives life to the dead and calls into existence the things that do not exist. (underlines are mine)

Paul then turns to David and takes a quick peak at his life. David was the king of Israel and one day, was tempted to commit sexual sin with Bathsheba. When David found out that Bathsheba was pregnant from this adulterous relationship, he rigged a situation so that Bathsheba’s husband would be killed in combat. Essentially, David committed the sins of covetousness, adultery and murder.

Paul says of David in Romans 4:6-8  just as David also speaks of the blessing of the one to whom God counts righteousness apart from works: (Quote from Psalms 32:1-2) “Blessed are those whose lawless deeds are forgiven, and whose sins are covered; blessed is the man against whom the Lord will not count his sin.”

David comes to God after his sin with Bathsheba is exposed and he cries out for mercy. As a Jew, David knew that his sin demanded blood sacrifice and burn offerings as the Law required. But notice what he says about his understanding of God’s heart.

Psalms 51:16-17 For you will not delight in sacrifice, or I would give it; you will not be pleased with a burnt offering. 17 The sacrifices of God are a broken spirit; a broken and contrite heart, O God, you will not despise.

David, rather than obeying the Law repented from his heart and by faith, received forgiveness.