Man had faith, true, but it was not His own personal faith. Faith is created through a promise from God, thus Abraham believed and was justified and it was not of works. Romans 4
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,
(Rom 4:2-5)
You might also read Hebrews 11 giving a list of some of the heroes of faith before Jesus came.