Sheikh Hamed Al-`Ali, instructor of Islamic Heritage at the Faculty of Education, Kuwait and Imam of Dahiat As-Sabahiyya Mosque, states: The meaning of the hadith “Souls are like conscripted soldiers; those whom they recognize, they get along with, and those whom they do not recognize, they will not get along with” is that hearts have connection to one another. Once a person meets someone whom he/she loves some sort of affinity is spontaneously generated; and the reverse applies when meeting another person. The point is one does not know the reason why one feels good towards some people and feels bad towards others. That is due to the connection between their souls.
The souls of righteous people have connection as if they are recruited due to the purification in their hearts; on the contrary, the souls of devils –both humans and jinn – have connection since they have the same evil thoughts. That is why Allah says about the believers: (And (moreover) He hath put affection between their hearts.) (Al-Anfal 8: 63).
But when talking about the devils of jinn and human beings, He says: (Shall I inform you (of him) upon whom the Shaitans (devils) descend? They descend upon every lying, sinful one.) (Ash-Shu`ara’ 26: 221-222). He the Almighty also says: (And thus do We make some of the iniquitous to befriend others on account of what they earned.) (Al-An`am 6: 129). That is why when a believer meets wrong-doers or corrupt people, he or she does not feel at ease and finds it difficult to get along with them because of their sinful deeds; their souls act like oil and water that never mix.