Here we see a conunfrum being identified. Do we have mercy or judgment? Do we maintain our purity through judgment or by Grace.

I think Paul, as a pharisee, struggled with how to deal with sin. It is still an issue today.

I rather think that sin is evidence of a relationship problem. The solution to a relationship problem cannot be found outside the parties of the relationship.

So, Paul is correct in his position. The person who is part of the body needs to rectify their behavior which is hurting the body and afterwards be restored to full fellowship.