We all make judgment calls. No one wants to be judged and I doubt anyone wants to be known as a judgmental person. But there are times when a judgment call is appropriate.
When it is obvious that certain people are harmful and cause problems, it's appropriate to warn others about them. This is what Paul does here, but notice it's not done with vindictiveness or malice. This is the responsibility of a leader, especially a pastor or elder in the church.
Slander is not okay, but just as a parent warns a child about some danger or dangerous person, pastoral leaders need to warn those under their care.