When I was still in the organization I did some truly awful things and was deservedly disfellowshipped. I was a threat to the spiritual health of anyone I spoke to, so shunning actually made some sense then. But just like I snapped and started acting out, I one day woke up and realized how off the mark I was and started seeking forgiveness from those I'd hurt, including the congregation, via the judicial committee. They met with me, read me the "several months, a year, or even longer" time-frame suggested by the OM book for keeping DF'd people out, and encouraged me to show my repentence by attending every meeting.
Of course, I was overwhelmed with guilt, so I was happy to be told what to do in order to get myself "back with Jehovah". As the weeks passed, though, I couldn't help but notice that 1Cor 5:11 said to 'quit mixing in company with' people that ARE fornicators, idolators, etc, etc. Not that HAVE BEEN such, but that currently ARE. Since I'd stopped all my sinful practices, I couldn't understand why the shunning couldn't immediately be lifted. I was never given a scriptural answer to that, but I was fully indoctrinated at the time, so I'm sure I accepted whatever lame excuse they offered for it.
Personally, I think the Bible supports the shunning concept, but that when the immoral person stops doing the immoral thing, it ought to stop. The prodigal son in Jesus own illustration wasn't told to wait "several months, a year, or even longer" before his father would accept him back.
As for DF'ing over "apostasy" (i.e., believing something different than JW's), I think they use 2John1:10,11 where John warns that if someone comes to you and doesn't bear "this teaching" (the teaching of the Christ, see earlier verses) then you shouldn't have him in your home, or say a greeting to him. To do so is to "share in his wicked works". I doubt John was referring to the whole body of doctrine currently taught by the Watchtower ( ), but that's the way the JW's apply it. Verse 7 specifically warns about people that don't teach Christ came in the flesh, this is clearly a narrow warning against those that would teach against Jesus as the Christ. But of course they abuse it.
I should probably add that I don't think outright "shunning" is appropriate ever. I can't imagine what it would take to make me act uncivilly toward a group of people. Perhaps a single individual of my own choosing, but never a "class" of people. I do think the Bible supports that concept, but I don't believe the Bible is inspired.
Dave