This verse indicates that there are members of the Church who, in God’s view, don’t really belong to his church. In the scriptures, the Lord does not define membership in his church based upon whether one’s name is on the roles. Rather, he defines membership based upon whether one’s heart is contrite, ’Behold, this is my doctrine—whosoever repenteth and cometh unto me, the same is my church. Whosoever declareth more or less than this, the same is not of me, but is against me; therefore he is not of my church’ (DC 10:67-8).
Unfortunately, because pride is so prevalent, there are those today who are professing to belong rather than truly belonging to the Lord. They are like the prideful at the last day, who will cry, ’Lord, Lord, have we not prophesied in thy name? And in thy name have cast out devils? And in thy name done many wonderful works? And then will I profess unto them, I never knew you: depart from me, ye that work iniquity’ (Matt 7:22-3). To these the Lord has given strict warnings. They are the first to suffer the wrath of God when the Lord decides to “clean house”, ’Behold vengeance cometh speedily upon the inhabitants of the earth, a day of wrath, a day of burning, a day of desolation…And upon my house shall it begin, and from my house shall it go forth, saith the Lord; First among those among you, saith the Lord, who have professed to know my name and have not known me’ (DC 112:24-26).
Hugh Nibley
“…there are two churches. There are the people who profess it, and the people who really are. They all profess to belong to the church of God, but how do you distinguish? Well, as Paul says, our security rests in this. God knows his own. Only he knows the ones who are true Latter-day Saints and those who aren’t. We have no means of knowing. You’d be surprised what rascals there are among us and what good people there are among us too. But you never suspect.” (Teachings From The Book of Mormon, Lecture 75, p. 215)