“When we see men of worth, we should think of equaling them; when we see men of a contrary character, we should turn inwards and examine ourselves.” – Confucius
Anyone could judge someone else; humans do it instinctively. But it’s much harder to analyze ourselves. When we see a bad or otherwise disagreeable person, take a moment to wonder if you’re any different than they are. Most people are hypocritical without even realizing it.
I would also interpret this quote as suggesting that we should look at such negative individuals as examples of what not to be. Emulate the good and virtuous, but try to learn from the immoral as well. Confronting both positive and negative characters can be very educational.