What Jesus admonished against more specifically was judging another person’s inner life, and their standing and status before God. He also taught, understandably so, that people do and even “must” judge others according to their acts and deeds. It’s just a part of life that judgments are going to be made, whether they are made rightly or wrongly, for lesser topics than a person’s standing before God, and about these, Jesus says in the UB:
“You must judge your fellows by their deeds; the Father in heaven judges by the intent.” (140:6.4)
“Your fellows must judge you by what you did, but there is a Judge to whom you may appeal for forgiveness, and who will judge you by your real motives and better intentions. You need not fear to meet the judgment of God if your repentance is genuine and your faith sincere.” (133:4.12)
“You can only judge men by their acts, but my Father looks into the hearts if his children and in mercy ajudges them in accordance with their intents and real desires.” (140:6.4)
“While you cannot pretend to sit in judgment on the souls of your fellows, and while you may not forgive sins or otherwise presume to usurp the prerogatives of the supervisors of the heavenly hosts, at the same time, it has been committed to your hands that you should maintain temporal order in the kingdom on earth. While you may not meddle with the divine decrees concerning eternal life, you shall determine the issues of conduct as they concern the temporal welfare of the brotherhood on earth.” (159:1.3)
“Judge justly, even mercifully… judge as you would be judged” (133:4.7).