Does a Muslim have to get married?
In accordance with the state of those getting married, the decree of marriage falls into these categories: fard (obligatory), wajib (close to obligatory), sunnat (practice of The Prophet; not obligatory but carries much reward), haram (forbidden), makruh (disliked) or mubah (permitted):
1. It is fard (obligatory) for the one who is certain to fall into adultery if he does not marry, to get married, on condition that he has the finances to give the dowry (mehr) and to provide for his wife.
2. Again for the man who is in danger of falling into adultery if not married, it is wajib to get married on condition that he has the finances to provide the dowry and livelihood of the wife. The majority except for the Hanafis do not differentiate between fard and wajib. (Ibnul-Humam, the work mentioned, II, 342; al-Kasani, al-Badayi', II, 260 et al)
3. It is haram (forbidden) for the one who is certain to oppress one's spouse if married, to get married. For the one who fears both falling into adultery and oppressing one's spouse, the aspect of haram (prohibition) is preferred. For if in a matter halal (lawfulness) and haram are present, as a principle haram is prominently taken as criterion and it must be avoided. Similarly, in a verse in the Qur'an, it is stated: “Let those who cannot afford to marry keep themselves chaste until God grants them sufficiency out of His bounty.” (The Qur'an, An-Nur, 24:33)
4. It is makruh (disliked) for the one who is feared to oppress one's spouse, to get married. (al-Mawsili, al-Ihtiyar, III, 82)
5. It is sunnat (practice of The Prophet) for those in moderate sexual state (itidal) to get married. Itidal is the state of the one who is not feared to fall into adultery if he doesn't get married, and who is not feared to oppress his spouse if he gets married. The majority of the community falls into this group. The hadiths mentioned above which advice young people who cannot marry to fast, and which warn the three Companions who decide to abstain from marriage, are the evidence for that.
On the other hand, The Prophet and the Companions got married and those following them continued that sunnat. That is the preferred view. (See al-Fatawal-Hindiyya, I, 267)
According to Imam Shafii, though, it is permitted to marry in that case. It is permitted to marry or to stay bachelor. According to him, dedicating one's time to worshiping and engaging in knowledge is superior to marriage. The proofs he bases his view on are these: Allah praised Prophet Yahya (John) with these words: “...lordly, perfectly chaste, a Prophet, among the righteous.” (The Qur'an, Al-'Imran, 3:39). The expression 'hasur' (perfectly chaste) in the original Arabic text of the verse refers to the person who does not engage in sexual intercourse with a woman although he has the potency. If marriage was superior to that, abandoning it would not be praised. However, the majority of scholars have said that this example is a practice of former Sharia (Religious Law) and that it is not binding upon the Community of Islam.
Another proof that Imam Shafii puts forward is this verse: “...Lawful for you are all beyond those mentioned, that you may seek, offering them of your wealth, taking them in sound chastity (i.e. in marriage), and not in licentiousness...” (The Qur'an, An-Nisa, 4:24) That something is halal (lawful) means it is mubah (permitted). For these two words are synonyms. On the other hand, marriage provides sexual benefit for the married person. But it is not wacib for somebody to perform something that is to his/her benefit. Thus marriage is among the actions such as eating and drinking, shopping which are mubah. (az-Zuhayli, al Fikhu'l-Islami wa Adillatuh, Dimashk 1405/1985, VII, 33, 34; Ibn Hajar al-Askalani, Bulugul-Maram min Adillatil-Ahkam, trans. Ahmed Davudoğlu, Istanbul 1967, II, 228 et al.; Hamdi Döndüren, Delilleriyle İslâm Hukuku, Istanbul 1983, p. 183, 184)