I had this answer from a similar thread last year.
In Matthew 18:15-17, Jesus set up an accountability system. When a professing believer starts living like an unbeliever, those in the church who know about it are to confront him about his sin. First, one is to go to this person, and then, if he will not listen, the one is to bring one or two others along for a second conversation. The goal is to restore him back to full fellowship with the Lord and his fellow believers. If he persistently and unrepentantly refuses to return to the Lord, the final step is to report the matter to the church. Then everyone in the church has the chance to win the person back. And if he continues in his sin, the church is to withdraw fellowship from him as the final means of showing him his need to repent. If you aren't part of the church, they have no authority over you and cannot do what Jesus said to do. Unless you join the church, your independence places you outside the way Jesus wants things to happen.
Incidentally, when Jesus says in verse 17 to bring this matter "to the church," how do you know who should be notified (and who should not be) unless there is a formally recognized membership? Related to this idea of spiritual authority, recall Hebrews 13:17, the passage we examined which tells us to obey the leaders of the church and submit to them because they keep watch over our souls. The leaders of the church are to "watch over" you by providing spiritual protection for you and caring about your growth in Christ. You place yourself outside that spiritual watchcare unless you join a local church. The meaning of the word "join" in Acts. 5:13 makes sense only in the context of membership. In Acts 5:13 we read of the reaction of the non-Christians in Jerusalem after a couple within the church, Ananias and Sapphira, had died on the spot when it was revealed that they had lied to the church. It says, "Yet none of the rest dared join them, but the people esteemed them highly." The unbelievers had great respect for the Christians, but after this incident none of them who claimed to be converted but were outward-only believers wanted to join the church. In the Greek language in which Paul wrote this letter, the word he used that's translated here as "join" literally means "to glue or cement together, to unite, to join firmly." It doesn't refer to an informal, merely assumed sort of relationship, but one where you choose to "glue" or "join" yourself firmly to the others. Again, that kind of language only makes sense in the context of membership. That same "glue word" is used in the New Testament to describe being joined together in a sexual relationship (1 Corinthians 6:16) and being joined to the Lord in one spirit in salvation (1 Corinthians 6:17). And it's the very same word Paul uses in 1 Corinthians 5:11 when he says "not to keep company with" any so-called brother who continues in immorality, but rather to "put away from yourselves the evil person." Clearly this kind of language doesn't refer to a casual, superficial, or informal relationship. So when it says in Acts 5:13 that no insincere believer "dared join them," the "glue word" used there speaks of such a cohesive, bonding relationship that it must be referring to a recognized church membership. The meaning of "the whole church" in 1 Corinthians 14:23 makes sense only in the context of membership
The earthly founder of the church at Corinth, the Apostle Paul, wrote to this new body of Christians about their many difficulties, including how to bring order to their public worship. He began 1 Corinthians 14:23 with, "Therefore if the whole church comes together in one place, . . ." Who did he have in mind when he referred to "the whole church"? The only realistic answer is "the church members." That's why one commentator, working with the original language of this text, translates it "If then the whole church assembles together and all its members" and notes "(the last two words are not in the Greek but are naturally to be understood)."1 Imagine the leaders of the Corinthian Christians walking into the gathering of the church for worship one Sunday. Would they have known by looking, or would they have had some way of deciding, whether "the whole church" was there? Surely they would have known who was supposed to be present in a churchwide meeting and who was missing. But how else could they have known when "the whole church" was "together in one place" without knowing who was a member and who wasn't? This implies a verifiable membership.
The instructions for pastoral oversight and spiritual leadership make sense only in the context of membership "This is a faithful saying:," said Paul to Timothy, "If a man desires the position of a bishop, he desires a good work" (1 Timothy 3:1). In other places the New Testament also refers to a bishop, or "overseer" as the NIV and NASB render it, as a pastor or elder (Acts 20:17, 28; Philippians 1:1; Titus 1:5-7). But what or whom does he oversee? How can he provide spiritual oversight if he doesn't know exactly those for whom he is responsible? A distinguishable, mutually-understood membership is required for him to fulfill his charge. Down in verse 5 it says of an overseer, "for if a man does not know how to rule his own house, how will he take care of the church of God?" The local church is compared to a family. Is anyone a casual member of a family? No, membership in a family is a very definite thing.
"Take heed to yourselves," Paul instructed the elders of the church of Ephesus, "and to all the flock" (Acts 20:28). How could they fulfill their responsibility as undershepherds to "all" the flock unless they knew who was part of "the flock" and who was not? These leaders of a growing church in a large city needed some means of identification of those for whom they were to "take heed." A simple membership list is the logical solution. In Hebrews 13:17 is a word addressed to those under such overseers: "Obey those who rule over you, and be submissive, for they watch out for your souls, as those who must give account. Let them do so with joy and not with grief, for that would be unprofitable for you." For whom will the leaders of a church give an account-everyone who comes in and out of their church services? No, it has to be a limited group of people-the members of the church-for whom they will be answerable. Otherwise, how can church leaders be responsible for someone until they know he or she is committed to their care? The Bible's instructions for pastoral oversight and spiritual leadership can best be obeyed when there is a well-defined church membership. The metaphors used to describe local churches (flock, temple, body, household) make sense only in the context of membership.The New Testament uses several metaphors to describe churches. Some of these metaphors describe the church of Christ collectively throughout the world. While all of them could potentially apply to the local church also, at least four of these metaphors-flock, temple, body, and household-are definitely used to refer to individual churches (in Acts 20:28; Ephesians 2:21; 1 Corinthians 12:27, and 1 Timothy 3:15). And each metaphor is best understood in a setting of specific church membership. A flock of sheep isn't a random collection of ewes, rams, and lambs. Shepherds know their flocks. They know which sheep are theirs to care for and which are not. Sheep belong to specific flocks. This is also the way it should be for God's spiritual sheep. A temple building, just like a church building, shouldn't have any loose bricks or blocks. If it does, something's wrong. Each one of them has a definite place. "There is no place," said an English preacher long ago, "for any loose stone in God's edifice."2 The same analogy is true for a human body. Your body isn't a casual collection of loosely related parts. You don't keep your fingers in your pocket until you need them. They are joined. They are members of the body. The local body of Christ should be like this also-those joined to Christ, who are members of His body-should express that relationship through a visible membership. And in a household, a family, you're either a member or you're not. So if you are part of the family of God, show it by joining a local expression of God's family.