Because if Abraham was made righteous because of his actions, he would have had a reason to brag, but not in front of God.