Some people need to leave their church if they are taught that Paul was saying Abraham was deemed righteous before obeying anything God said to do! It is about circumcising the flesh and the law.
This point you raise I have never questioned before. It is obvious Abraham responded to God
and this response was obedience. The offering of Issac demonstrated his faith to which God
responds,
"Now I know that you fear
God, because you have not withheld from me your son, your only son."
Gen 22:12
It was Abrahams obedience that showed his faith. And it was this faith that was reconned as
righteousness. Some seem to find this connection impossible, but then for them behaviour is
irrelevant, and faith is just a believe with not guarantee of action, which in James words is
dead. A pilot flies planes, one who knows all the theory is just a student. God is interested in
pilots not students. Students could be rubbish or good, you only know when they actually fly.
With all the odd teaching from the old testament, what is good and what is evil in the teachers
eyes is often very unexpected. One is only actions by believers are good, no unbeliever can do
anything good or worthy of reward. It comes unstuck when non Israelities doing good things
and the Lord rewarding them. Abimelech is spared because he did not defile Sarah.
God recognised an unbeliever and kept him from sin. Not possible in their theology.