Pastors need to know the flock to preach effectively. Here is a comment from the Westminster Directory of Public Worship. Bold is mine. The pastor
Needs not always to prosecute every doctrine which lies in his text, so is he wisely to make choice of such uses as, by his residence and conversing with the flock, he finds most needful and seasonable; and among these, such as may draw their souls to Christ the fountain of light, holiness, and comfort.
A man who knows his sheep will be able to bring the Word of God to them each Lord’s Day in such a way as to rebuke their sins where they are falling, encourage perseverance where they are growing in holiness, comfort them in the midst of pain and difficulties, and most of all draw them to Christ.
I know it is not possible in every church for the pastor to know every member. But the pastor should be among the people enough to know them well enough to bring the Word to them effectively each Sunday. If he doesn’t know his sheep he might be preaching on Sundays, but he won’t be preaching to them.
The following is a quote from The Sum of Saving Knowledge, Section II by the Westminster Assembly
That the righteousness of every true Christian must be more than the righteousness of the scribes and Pharisees; for the scribes and Pharisees, albeit they took great pains to discharge sundry duties of the law, yet they cut short the exposition thereof, that it might the less condemn their practice; they studied the outward part of the duty, but neglected the inward and spiritual part; they discharged some of the meaner [lesser] duties carefully, but neglected judgment, mercy, and the love of God: in a word they went about to establish their own righteousness, and rejected the righteousness of God by faith in Jesus
But a true Christian must have more than all of this; he must acknowledge the full extent of the spiritual meaning of the law, and have a respect to all the commandments, and labor to cleanse himself from all filthiness of flesh and spirit, and “not lay weight upon what service he has done, or shall do,” but cloth himself with the imputed righteousness of Christ, which only can hide his nakedness or else he cannot be saved; so says the text [Matthew 5:16-20].