Believers Must Be Together and Cooperate
Hold fast to the rope of Allah all together, and do not separate. Remember Allah's blessing to you when you were enemies and He joined your hearts together so that you became brothers by His blessing. You were on the very brink of a pit of the Fire and He rescued you from it. In this way Allah makes His Signs clear to you, so that hopefully you will be guided... (Surah Al 'Imran: 103)
People generally tend to make friends with others who possess similar qualities of character. They prefer people who share their outlook on life, enjoy the same things, and with whom they can get along well. As a consequence, those who share the same views inevitably build a strong bond among themselves. Honorable and honest people attract honorable and honest people like themselves; they do not make friends with wicked people. People who are dishonest and prone to mischief, on the other hand, tend to associate with others who are dishonest.
Believers, who are the only group, among all others, with whose character Allah is pleased, must, in accordance to Allah's command, and in conformity with their natural inclination, always remain together.
Indeed, it is an act of worship commanded by Allah in the Qur'an. Allah commands believers to remain together with other believers, and not to obey those who are irreverent:
Restrain yourself patiently with those who call on their Lord morning and evening, desiring His face. Do not turn your eyes from them, desiring the attractions of this world. And do not obey someone whose heart We have made neglectful of Our remembrance and who follows his own whims and desires and whose life has transgressed all bounds. (Surat al-Kahf: 28)
Believers are the only group of people on Earth that seek Allah's pleasure. Only they adopt the character traits with which Allah is pleased. These are not sufficient alone, however; it is necessary for there to be an environment where these values may be practiced and people to whom they may be exercised. Allah wants us to be just, to behave compassionately and mercifully, to enjoin what is right, and to adopt the values praised in the Qur'an. However, one cannot adhere to these values without the existence of other people. In other words, to be a compassionate and self-sacrificing person, one needs to be around the type of people who can appreciate this excellence of character, as well as deserve such treatment. Such people are the believers.
No sincere believer wants to make friends with someone who does not conduct himself as Allah commands, who has not adopted the values of the Qur'an, and thus, who wants only to be around other thoughtless people like himself. Furthermore, he does not nurture affection towards people who do not respect his beliefs, who condemn him because of his faith in Allah and his living his life by the values of the religion, and wants to drive him away from society and treat him with hostility:
You who believe! Do not take My enemy and your enemy as friends, showing love for them when they have rejected the truth that has come to you, driving out the Messenger and yourselves simply because you believe in Allah your Lord. If you have gone forth to strive for My sake and seeking My pleasure, keeping secret the love you have for them, I know best what you conceal and what you make known. Any of you who do that have strayed from the right way. If they come upon you, they will be your enemies and stretch out their hands and tongues against you with evil intent, and they would dearly love you to become unbelievers. (Surat al-Mumtahana: 1-2)
Allah informs us that it is not right to harbour love for such people, nor to make friends with them, and adds that believers must always remain with other believers:
You who believe! Have fear of Allah and be with the truly sincere. (Surat at-Tawba: 119)
Of course, a believer must approach everyone, including unbelievers, with a friendly and tolerant manner, and treat them justly. However, treating unbelievers with tolerance and justice is very different from actually adopting them as close friends. A believer takes only those who are believers like him as friends. This is Allah's command:
Your friend is only Allah and His Messenger and those who believe: those who attend to their prayers, pay the welfare tax (zakat), and kneel down in worship. (Surat al-Ma'ida: 55)