When JWs are loving and caring in the congregation, they are behaving like most humans would in a similar situation. Think of it - getting together 3 times a week and then engaging in activities like field service which isolate them from the rest of society - they are bound to get close.
That's why the shunning policy is so cruel and manipulative.