Yehoshua ben Perachya says: Make for yourself a mentor; acquire for yourself a friend; and grant every person the benefit of the doubt.
~Ethics of Fathers 1:6
A successful life is depends upon the guidance of responsible teachers, the company of sound friends, and a willingness to fully understand who people are before judging them.
Submitting to authority keeps us respectful, humble, and confident in the path we follow. The company of worthy companions prevents us from straying after our own egos and illusions. Deliberation in forming our opinions of others saves us from the evils of stereotyping and groupthink.
But not every authority is responsible, not every would-be friend is deserving of friendship, and some people are truly wicked. Wisdom comes with experience, and experience can be painful.
If we are sincere and disciplined in our efforts, then our missteps will always be instructive rather than catastrophic, and we will ultimately find our way.