Church membership matters but is not always practical, & disciplining non-members

In one of the many churches I’ve discerningly visited here in the Bible Belt, the pastor told me that Christians who refuse to apply for membership are intentionally “avoiding church discipline.” I suspect he was referring to me because, at that time, I had visited that church for three months (though no longer there). But