This objection which the Apostle expects is wrong because it assumes that the law has only one function, that is, to justify. That is clearly not the case as the Apostle showed before (v. 20) that knowledge of sin comes from the law. Moreover, through the law, we know our duty as redeemed believers of what God expects from us (see above The Moral Law In John especially). Matthew Henry notes on this passage:
He [Paul] obviates an objection (Rom 3:31), as if this doctrine did nullify the law, which they knew came from God: “No,” says he, “though we do say that the law will not justify us, yet we do not therefore say that it was given in vain, or is of no use to us; no, we establish the right use of the law, and secure its standing, by fixing it on the right basis. The law is still of use to convince us of what is past, and to direct us for the future; though we cannot be saved by it as a covenant, yet we own it, and submit to it, as a rule in the hand of the Mediator, subordinate to the law of grace; and so are so far from overthrowing that we establish the law.” Let those consider this who deny the obligation of the moral law on believers.
As justified believers, we do not seek justification by the law, but we seek God’s will which is found in His law. We strive to obey God’s commandments as a way of expressing our gratitude and love for Him, not to gain acceptance. The moral law moreover, sends us back to the cross where we should always be. When we sin, the moral law shows us our sin and as believers, we know Who dealt once for all with sin. The Law sends us to the cross and the cross sends us to the Law by pointing to the gratitude and love that we owe God which is expressed by keeping His commandments (e.g. 1John 5:3). The Commentary Critical and Explanatory on the Whole Bible writes:
The glory of God's law, in its eternal and immutable obligations, is then only fully apprehended by the sinner, and then only felt in the depths of his soul, when, believing that "He was made sin for him who knew no sin," he sees himself "made the righteousness of God in Him." [2Cor 5:21] Thus we do not make void the law through faith; yea, we establish the law.
The law that we are under is not the law of works, but of faith. It is based on principle and doctrine of justification by faith alone, and not by the law in any way. It is a law of grace, to lead us in the paths that God desires us to be and to conform us to His will. As a summary of what was discussed above, the Reformation Study Bible writes:
Paul is rejecting the law as the way of salvation. But since the law as moral demand was not given to sinners in order to justify them (vv. 19, 20), the principle of salvation by grace through faith cannot be a contradiction of the law. As he later demonstrates, the gospel upholds and furthers the law’s ultimate goal (8:3, 4; 13:8–10).
Romans chapter 7 is an excellent discussion on the law, the Christian and sin. I will not be able to give a whole exegesis on the passage, but I would like to take a look at some verses from here.
Died To The Law
Rom 7:4 Likewise, my brothers, you also have died to the law through the body of Christ, so that you may ...