Have you ever noticed that God does not hold the great men of Scripture up to us because of their personal goodness? Almost invariably their records are marred by failure and sin, but God bids us look at their faith, to see what their faith did for them. Even those who lived consistently good lives are not held up to us for their personal worth, because God knows their imperfections. Thus Rom. 4:2,3 says:
“For if Abraham were justified by works, he hath whereof to glory– but not before God. For what saith the Scripture? Abraham believed God, and it was counted unto him for righteousness.”
And Rom. 4:6 goes on to say about David:
“Even as David also describeth the blessedness of the man unto whom God imputeth righteousness without works.”
This is because man cannot live a life good enough to make him acceptable to God, for with God only perfection is good enough. One sin spoiled the earth; God will not allow one sin to spoil heaven too. This is why in grace He gave Christ to die for our sins and to pay the just penalty for us. Because of the all-sufficient payment of Christ in our behalf, God can now be “just, and the Justifier” of those who place their faith in Christ (Rom. 3:26).
The famous eleventh chapter of Paul’s letter to the Hebrews bears out the fact that salvation, or acceptance with God, is obtained, not by human effort, but by faith. This great chapter on the heroes in God’s “Hall of Fame,” begins with the words: “For by it [faith] the elders obtained a good report,” and then goes on: “By faith Abel …,” “By faith Enoch…,” “By faith Noah…,” “By faith Abraham…,” etc., and closes with the declaration:
“…these all…obtained a good report through faith…” source