People tend to take an interest in those they love, adopt some of their habits, and seek their company. Affection can therefore shape a person's friendships and choices.
Love for upright people should lead beyond verbal admiration to an appreciation of truthfulness, trustworthiness, devotion, and good character. It does not require excusing every mistake made by someone one admires.
Consider a student choosing between two groups of friends. One encourages honest study and courtesy; the other encourages cheating and hurtful speech. The choice can influence the student's habits and outlook.
الْمَرْءُ مَعَ مَنْ أَحَبَّ highlights the bond between love and companionship while leaving each person responsible for their own conduct.