"And I think you agree with me that to judge any religion or ideology, it is the teachings and principles which should be probed, not the misbehaviour of the followers."

Yes, I agree. But when the followers of a religion start committing atrocities and use their religion as the reason, people are inevitably (and perhaps justifiably) going to judge the religion based on these followers.