Justification by faith was based on the model of all of humanity being sinners who deserve eternal damnation, but Christ made a payment which resulted in Him bearing our sins instead of us, and by faith we could accept the payment and have his righteousness imputed to us. Salvation is therefore by faith alone without any works on our part.
Luther therefore declared James to be heretically wrong in saying that -y pistis, ean my echy erga, nekra estin kath eautyn- faith, unless it has works, is dead on its own (2:17).
Luther's objection would have been meaningless to Greek speaking theologians who understood -dikaioo- as a verb meaning to make righteous, and -dikaiosune- as the state of having been made righteous by God. In this model salvation is also by faith alone without any works or merit on our part. But since -dikaiosune- is a state of being visibly changed and eventually perfected (teleosis) by God, faith is proved to be dead if in fact no change has taken place in our lives. And that is exactly what James is saying. The -dikaiosune- righteousness, which God works in us as we have faith, will inevitably show in behavior such as love for neighbors (2:15-17). The faith that put Abraham right showed in his behaviour (2:21-23). And it was faith in God that showed in the life of Rahab, the prostitute (2:25).
James adds that -to soma choris ergon nekra estin- the human body is dead unless it has signs of life (2:26). It is not the body producing signs of life (works) hat gives it life, but if it is alive the evidence will show. A similar illustration of a spring and a fig tree (3:11-12) makes the same point, as does the work of the Holy Spirit in giving us wisdom (3:17).
What Luther should have argued is that -dikaiosune- the righteousness
of being made right is by faith alone. And this is the opposite of trying
to make ourselves right by our own works, which was the Galatian heresy.