Then when he says, for the end of the law is Christ, he explains what he had said, namely, that they are ignorant of God's justice and refuse to submit to him, while they seek to establish their own justice based on the law.
In regard to this it should be noted that, even as the philosophers say, the intention of any lawgiver is to make men virtuous: much more, then, the old law given by God to men was directed toward making men virtuous.
But the law was unable to do this of itself, because the law made no one perfect (Heb 7:19); rather, it ordained men to Christ whom it promised and prefigu...red: the law was our custodian until Christ came, that we might be justified by faith (Gal 3:24). And that is what he says, namely, that the end of the law is Christ, to whom the whole law is ordained: I have seen the end of all perfection (Ps 119:96); the end that through Christ men may attain the justice the law intended: for God has done what the law, weakened by the flesh, could not do: sending his own Son in the likeness of sinful flesh, he condemned sin in the flesh in order that the just requirement of the law might be fulfilled in us (Rom 8:3). And this to everyone who believes, because he justified his own by faith: to all who believed in his name he gave power to become children of God (John 1:12).
Source: Commentary on Romans