Yet he also said "let he who is without sin cast the first stone." and "Judge not, and ye shall not be judged: condemn not, and ye shall not be condemned: forgive, and ye shall be forgiven."
"As for the person who hears my words but does not keep them, I do not judge him. For I did not come to judge the world, but to save it. "
By the Christian doctrine, we Sin because God gave us free will. Jesus did not want to take that away. He would want all to follow the principles, but would not advocate condemning someone for not following. He sought not to punish sinners but restoring by reaching out to them. What of Matthew? He was a tax collector, whose profession was one of the most hated and corrupt at the time. Did Jesus condemn him? No, he dined with him, and asked Matthew to follow him.