And therefore it was imputed to him for righteousness.
This is why it was credited to him as righteousness.