The law is imperfect as a way of salvation because it cannot save people. And since this thread is about Salvation and the CCC Compendium quote is dealing with Salvation it is quite right to point to the Law's incapacity.
Romans 8:1 THERE is now therefore no condemnation to them that are in Christ Jesus, who walk not according to the flesh. 2For the law of the spirit of life, in Christ Jesus, hath delivered me from the law of sin and of death. 3For what the law could not do, in that it was weak through the flesh; God sending his own Son, in the likeness of sinful flesh and of sin, hath condemned sin in the flesh; 4That the justification of the law might be fulfilled in us, who walk not according to the flesh, but according to the spirit. 5For they that are according to the flesh, mind the things that are of the flesh; but they that are according to the spirit, mind the things that are of the spirit. 6For the wisdom of the flesh is death; but the wisdom of the spirit is life and peace. 7Because the wisdom of the flesh is an enemy to God; for it is not subject to the law of God, neither can it be. 8And they who are in the flesh, cannot please God.
Hebrews 7:11 If then perfection was by the Levitical priesthood, (for under it the people received the law,) what further need was there that another priest should rise according to the order of Melchisedech, and not be called according to the order of Aaron? 12For the priesthood being translated, it is necessary that a translation also be made of the law. 13For he, of whom these things are spoken, is of another tribe, of which no one attended on the altar. 14For it is evident that our Lord sprung out of Juda: in which tribe Moses spoke nothing concerning priests. 15And it is yet far more evident: if according to the similitude of Melchisedech there ariseth another priest, 16Who is made not according to the law of a carnal commandment, but according to the power of an indissoluble life:
17For he testifieth: Thou art a priest for ever, according to the order of Melchisedech.
18There is indeed a setting aside of the former commandment, because of the weakness and unprofitableness thereof: 19(For the law brought nothing to perfection,) but a bringing in of a better hope, by which we draw nigh to God. 20And inasmuch as it is not without an oath, (for the others indeed were made priests without an oath;
21But this with an oath, by him that said unto him: The Lord hath sworn, and he will not repent, Thou art a priest for ever.)
22By so much is Jesus made a surety of a better testament.
23And the others indeed were made many priests, because by reason of death they were not suffered to continue: 24But this, for that he continueth for ever, hath an everlasting priesthood, 25Whereby he is able also to save for ever them that come to God by him; always living to make intercession for us.
26For it was fitting that we should have such a high priest, holy, innocent, undefiled, separated from sinners, and made higher than the heavens; 27Who needeth not daily (as the other priests) to offer sacrifices first for his own sins, and then for the people's: for this he did once, in offering himself. 28For the law maketh men priests, who have infirmity: but the word of the oath, which was since the law, the Son who is perfected for evermore.
Every Christian who is instructed in the gospel knows these passages. The CCC Compendium relies on its readers being either well instructed or being in the process of being instructed in the lessons of the gospel. But if the references alluded to in the CCC Compendium escaped the notice of a reader then rest assured that they did not escape the notice of the authors who supply footnotes and references back to the Catechism of the Catholic Church in which the scripture passages are listed for the benefit of the instructed as well as the instructors.