There are several issues involved… separation from a person who claims to be a Christian (in Fellowship with Christ) and shunning are two different behaviors. The latter can be done out of malice, spite, or ignorance–dealing with nothing but temporal values. The first is distinct because of the culture of Worship. If I say I am a Christian and a continuously practice a life of sin, I am proving to not be what I claim; still, I can reconcile myself with God through the Sacrament of Confession.
The problem arises when, through my behavior, I lead others to sin or rejection of God. It is here where the Church must and does curtails the acceptance of her members. The Church calls it excommunication.
In the early Church it was easy to spot the anti-Christian behavior because of the closeness of its members (most would know each other through family or friends); also, as the culture changed, Believers and non-Believers alike, rejected wicked behavior (that’s not to say that sin and wickedness did not exist). Today, wickedness is celebrated and the hunger/vanity/lust for ego stroking causes even the “Believers” to follow the world rather than God.
As an example: it is commonly known that to commit adultery is sinning against God’s Commandment; yet, even “Believers” continue to follow society’s morals rather than God’s Law–then there are those who claim not to sin because they are not married while they fully know that the Command extends to sexual promiscuity (sexual intercourse outside of marriage).
The Church warns that those who are not in a state of Grace should not receive the Holy Communion–light but an excommunication nonetheless.
The Hope is that those who are engaged in a sinful life return to Christ’s Fold–not just the pretense of Confession but an actual Turn Back to God!
The Church follows Christ even in this (handling sin and sinners):
13 Go and learn the meaning of the words: Mercy is what pleases me, not sacrifice. And indeed I came to call not the upright, but sinners.’ (St. Matthew 9:13)
Most of the times people separate themselves from the Church because in their hearts they are convicted by Christ’s Word:
19 And the judgement is this: though the light has come into the world people have preferred darkness to the light because their deeds were evil. 20 And indeed, everybody who does wrong hates the light and avoids it, to prevent his actions from being shown up; 21 but whoever does the truth comes out into the light, so that what he is doing may plainly appear as done in God.’ (St. John 3:19-21)
Generally you see the Scripture today applied to things like the speakers one chooses in a parish or a Catholic school. Obviously you want somebody who isn’t doing blatantly evil stuff, and who isn’t teaching lies instead of Church teaching. You also see it applied by the CDF, when they are forced to tell some theologian that they aren’t teaching Catholic theology and shouldn’t have a job at a Catholic university.
But most of the time, this sort of thing is considered a matter for knowledgeable pastors and bishops, not for people in the pews who don’t have good information.
Also, canon law protects the rights of people who are accused of teaching heresy or being public sinners. If it gets to the point of actual canonical crime, the facts have to be determined by trial and under the oversight of a bishop, not by guess and gosh.
Would the practice of shunning someone contradict the teachings on judging others? i.e.
Therefore you have no excuse, whoever you are, when you judge others; for in passing judgement on another you condemn yourself, because you, the judge, are doing the very same things. 2 You say,[a] ‘We know that God’s judgement on those who do such things is in accordance with truth.’ 3 Do you imagine, whoever you are, that when you judge those who do such things and yet do them yourself, you will escape the judgement of God?
…well there’s judging and then there’s judging.
Notice, though, that the passage actually states that there’s no escape for those who judge the behavior/practices of others while committing themselves to the same…
I’m Catholic, does that means that I’m “saved” while others who are not Catholic are damned to hell? No
I may not abuse drugs and alcohol, does that means that all those who I know/see abusing drugs and alcohol are going to die in their sin and I will enter joyfully into Heaven? No
I am Taught by God not to judge others since I would be usurping His Authority!
But if I constantly live a life of sin and become a stumbling block for others the Church has to pass judgment and rebuke me; the Church is the Body of Christ and she cannot foster wickedness and heresy:
7b …only there are some that trouble you, and would pervert the gospel of Christ. 8 But though we, or an angel from heaven, preach a gospel to you besides that which we have preached to you, let him be anathema. 9 As we said before, so now I say again: If any one preach to you a gospel, besides that which you have received, let him be anathema. 10 For do I now persuade men, or God? Or do I seek to please men? If I yet pleased men, I should not be the servant of Christ. 11 For I give you to understand, brethren, that the gospel which was preached by me is not according to man. 12 For neither did I receive it of man, nor did I learn it; but by the revelation of Jesus Christ. (Galatians 1:7b-12)
So Believers cannot judge the righteousness or Salvation of others; but through our behavior we open ourselves to judgment. And there is an escalation of correction that naturally follows:
15 But if thy brother shall offend against thee, go, and rebuke him between thee and him alone. If he shall hear thee, thou shalt gain thy brother. 16 And if he will not hear thee, take with thee one or two more: that in the mouth of two or three witnesses every word may stand. 17 And if he will not hear them: tell the church. And if he will not hear the church, let him be to thee as the heathen and publican. 18 Amen I say to you, whatsoever you shall bind upon earth, shall be bound also in heaven; and whatsoever you shall loose upon earth, shall be loosed also in heaven. (St. Matthew 18:15-18)