It has to do with one of the effects of Luther's soteriology, and I think that it goes to show that ideas have consequences.
The profession of faith in Christ demanded by the Lord when he sits in judgment is explained as the discovery of Christ in the least of men, in those who need my help. From here onward, to profess one's faith in Christ means to recognize the man who needs me as the Christ in the form in which he comes to meet me here and now; it means understanding the challenge of love as the challenge of faith. The apparent reinterpretation here - in Matthew 25 - of the christological profession of faith into the unconditionality of human service and mutual help is not to be regarded, after what we have said, as an escape from otherwise prevailing dogma; it is in truth the logical consequence of the hyphen between Jesus and Christ and, therefore, comes right from the heart of Christology itself. For this hyphen - let me repeat - is at the same time the hyphen between faith and love. Therefore it is also true that faith that is not love is not really a Christian faith; it only seems to be such - a fact that must redound both against any doctrinalistic misunderstanding of the Catholic concept of faith and against the secularization of love that proceeds in Luther from the notion of justification exclusively by faith (p. 209, bold added; italics in original).Yowza. But what does he mean by this "secularization of love" that is a consequence of Luther's soteriology? He explains a bit more in the footnote.
Hacker shows there with an abundance of textual references that Luther as a reformer (i.e., from about 1520 onward) assigns love to the "outward life", to "the use of the second table", to life not with God but "with men", and thus to the realm of the profane, to what is called today "pure worldliness", and therefore to the "righteousness of the law". He thus secularizes it and excludes it from the realm of grace and salvation. Hacker is thereby able to demonstrate convincingly that Gogarten's [Gogarten was a German theologian - RdP] program of secularization can quite rightly claim to be based on Luther. It is clear that at this point Trent had to draw a firm dividing line and that where the secularization of love is retained the dividing line continues to run as it did before (emphasis added).Now if I understand him correctly, he's saying that with his doctrine of justification by faith alone, and a concomitant denial of the necessity of love for neighbor, Luther moved the theological virtue of charity to the category of "righteousness of the law" - and consequently divorced it from having any essential significance with regard to salvation. I don't know anything about Gogarten, but here is a brief article about him from Time magazine in 1966; in it Gogarten is said to have appealed to Luther as the forerunner of his secular theology. It seems clear from the above that Ratzinger considers Gogarten's work to be contrary to the Catholic understanding of the faith, inasmuch as it (apparently) wrongly drives a wedge between what we believe as Christians and our relationships with our fellow men. If love for God and neighbor are the two greatest commandments, then I can perhaps understand how Luther might get the idea - if they are reckoned to be commandments - that they fall under the division of the "righteousness of the law" that he rejects; but it seems rather clear from Mt. 25 (as the cardinal indicates above) that this charity is rather more important than an option, but rather is at the root of the judgment that we shall face. Our actions matter.