Perhaps the medium between these two implies that selecting...
Perhaps the medium between these two implies that selecting a good friend is a prerequisite for perceiving sin as big and finally escaping from sin; and choosing a bad friend is a requisite for getting even more polluted by sin, because a good friend can be a source of a lot of graces and favors in the same way that a bad friend is a cause of a great deal of aberrations and deviations.
A good friend motivates man to conceive sin as great and to always consider himself as ashamed and remorseful in the sight of Allah. Similarly, an immoral friend perpetually encourages man to perceive transgression as small; to such an extent that he does not feel ashamed of any sin. In this section, the Prophet (S) presents two criteria for selecting an associate: Having piety. Awareness of the divine permissible things and the forbidden ones, in other words, knowledge of the religion.
Certainly he led me astray from the reminder after it had come to me; and Satan fails to aid man.” [^1] In the same way that an impious friend is not worthy of making friendship with, no plans for friendship have to be made with an ignorant person. Even if he intends to perform a good deed, he falls into error and deviation as a result of ignorance.
Therefore, in the same way that awareness and piety are two wings for traversing the course of spiritual perfection and growth along the path of right, they are also two good standards for selecting a companion. It is for this reason that in his recommendation to Abu Dharr, the Noble Prophet (S) presents piety and religious scholarship as two criteria for choosing an associate.
Of course, it is proper that these two qualities are combined in man, because man who intends to perform his duties without being aware of his religion gets deceived by the Devil and the people, no matter how holy he might be.