After warning against false prophets, the Lord now exposes a deception more subtle still: confidence in outward works performed in His name without obedience of heart. For it is possible to speak rightly, to act with power, and yet to live without charity. The name of Christ may be on the lips while His will is absent from the life.
To say “Lord, Lord” is to make a profession of faith; but such profession is empty if it is not confirmed by obedience. The kingdom of heaven is promised, not to those who merely acknowledge Christ with words, but to those who do the will of the Father. Thus the Lord recalls His hearers from display to reality, from appearance to truth.
The works here named—prophecy, exorcism, mighty deeds—are not denied as real. They are acknowledged as having been done in His name. Yet they are shown to be insufficient, because they did not proceed from a righteous life. For God may use even the unworthy as instruments of His power, while withholding from them the reward of holiness.
When the Lord says, “I never knew you,” He does not deny foreknowledge, but fellowship. To be known by God is to be joined to Him in love; to be unknown is to be separated by iniquity. Those who worked wonders but did not work righteousness remained strangers to the One whose name they invoked.
Thus the Lord teaches that the final judgment will not inquire how impressive one’s deeds appeared, but whether the heart was ordered to God. Gifts without obedience do not save; power without charity does not unite. The soul must therefore seek not only to act in the name of Christ, but to live according to His will, lest even great works become a testimony against it.
Source: St. Augustine, On the Lord’s Sermon on the Mount, Book II, Chapters 25-26