Rather than speak of a “works principle,” we ought to speak of a death principle. Paul is clear that that Old Testament was a ministry of death and that the letter kills. It was when the commandment was given that sin sprang to live and “I died” (Rom. 7:9).
The law kills stuff. That was part of its original purpose in Eden too. Tree of life. Tree of death. To fulfill the law, Jesus could not have stopped with a perfect life. He needed to be obedient unto death, even death on a cross.