Q: What is the ruling on getting married? Is it a religious requirement?
A: The ruling on marriage differs based on personal circumstances.
Marriage is recommended for someone with sexual desires who is NOT afraid they will commit illicit sexual activity. It is preferred in this case over being free for voluntary worship.
It is simply allowed for someone without desire as the intent of marriage is to preserve one’s chastity, have children, and increase their lineage. In this case, being free for voluntary worship is preferred over marriage because they are likely unable to suffice their spouse in preserving their chastity. They are also likely to face obligations and rights that they cannot fulfill and in turn be distracted from seeking knowledge and worship with something of no benefit.
It is obligatory to get married due to an oath for someone who can marry and fears they will fornicate. There is no difference between one who can afford to do so and one who cannot. In this case, marriage takes precedence over the obligatory Hajj.
Source: Sharh al-Muntah