Assalaamu alaykum. I know that we are not allowed to join prayers without travelling unless there is a need and if it is not done as a habit. Even so, I have heard that we must do it in a congregation and in a mosque unless we are travelling. Otherwise, it is not allowed. The reason is that the Prophet, sallallaahu 'alayhi wa sallam, never joined prayers without travelling except in congregation and in a mosque. Is this true even for women who join their prayer for a need? Also, if someone joins prayers without any valid reason, does they have to make up for that? Or are the prayers valid, but it is sinful? Thank you.
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
Your question included several issues, and we will answer them as follows:
1- The scholars differed concerning the obligation of praying in congregation in the mosque for a man. As for a woman, it is permissible for her to attend the mosque provided that she abides by the Islamic conditions, but her prayer in her home is better than her prayer in the mosque.
Ibn Qudaamah said:
"It is permissible for women to attend the congregational prayer with men, because the women used to pray with the Prophet (in the mosque); ‘Aa’ishah, may Allah be pleased with her, said, 'The women used to pray the Fajr prayer with the Messenger of Allah and then they would leave wrapped in their garments and no one would recognize them because of the darkness.' [Al-Bukhaari and Muslim] However, her prayer in her home is better, as Ibn ‘Umar, may Allah be pleased with him, narrated that the Prophet said, 'Do not prevent your women from praying in the mosques, but their homes are better for them [i.e. their prayer in their homes is better for them].' [Abu Daawood]"
2- It is confirmed that the Prophet combined the prayers in Madeenah without being in a state of fear or rain. Ibn ‘Abbaas, may Allah be pleased with him, narrated, "The Prophet observed seven Rak‘ahs (units of prayer) and eight Rak‘ahs in Madeenah (i.e. he combined the Thuhr and ‘Asr prayers (eight Rak‘ahs) and the Maghrib and the ‘Ishaa’ prayers (seven Rak‘ahs).” [Al-Bukhaari and Muslim]
Another narration by Muslim reads, "The Prophet combined the Thuhr and ‘Asr prayers, and the Maghrib and the ‘Ishaa’ prayers in Madeenah without any fear or rain. He [Ibn ‘Abbaas] was asked, 'Why did he do so?' He replied, 'He intended not to cause any hardship for his nation.'"
Some scholars interpreted this combination of prayers as that the Prophet prayed the Thuhr at its ending time and the ‘Asr at its beginning time, and he prayed the Maghrib prayer at its ending time and the ‘Ishaa’ prayer at its beginning time. [This means that he prayed each prayer at its prescribed time]
Some other scholars interpreted this combining of prayers as that it was for a legitimate excuse, such as illness or mud (muddy roads); Shaykh Ibn ‘Uthaymeen said in Ash-Sharh al-Mumti‘:
"It is permissible for a sick person to combine the prayers, because if he does not do so, he faces hardship, i.e. fatigue or tiredness, regardless of the kind of disease he has, whether it be a headache, back pain, abdominal pain, pain in his skin, or otherwise; the evidence about this is the following:
1- The general saying of Allah (which means): {Allah intends for you ease and does not intend for you hardship.} [Quran 2:185]; and the saying of Allah (which means): {…and He has not placed upon you in the religion any difficulty.} [Quran 22:78]
2- The hadeeth by Ibn ‘Abbaas, may Allah be pleased with him, who narrated that 'the Prophet combined the Thuhr and ‘Asr prayers, and the Maghrib and 'Isha' prayers, in Madeenah without any fear or rain.' The scholars said: If there was no fear nor rain, while he was in Madeenah, then he was not travelling as well, and there is nothing left except illness, and there might be another reason than illness, but Ibn ‘Abbaas was asked, 'Why did he do so?' He replied, 'He intended not to cause any hardship for his nation;' meaning not to cause any hardship for the nation by not combining the prayers. From this, we conclude that whenever a Mukallaf (a person who is competent for religious assignments) faces hardship by not combining the prayers, it becomes permissible for him to combine them. It is for this reason that the author said, 'And for a sick person who faces hardship by not combining the prayers.'
It is understood from the statement of the author that if he does not face any hardship, it is not permissible for him to combine the prayers, and this is the understood meaning.
If someone says: What is an example of hardship? We say: Hardship is when one is affected by standing or sitting when he separates the two prayers, or that it is difficult for him to perform ablution for each prayer... there are different kinds of hardship.
In brief, the rule in this regard is: whenever a person experiences hardship by not combining the prayers, then it becomes permissible for him to combine the prayers whether he is resident or travelling."
Daqaa'iq Uli An-Nuha fee Sharh Muntaha Al-Iraadaat reads:
"Mud causes greater hardship than the cold, so it is more appropriate to combine the prayers in case of the presence of mud than in the case of cold weather. The evidence about this is the hadeeth of Ibn ‘Abbaas, may Allah be pleased with him, who related that the Prophet combined the prayers without any fear or rain in Madeenah. There is no other way to explain this by the lack of sickness except with mud. Al-Qaadhi said, 'It is more appropriate to understand it this way rather than interpreting it without an excuse; or by saying that the ruling is abrogated, as it is interpreted according to a benefit.'"
Therefore, it becomes clear from the above that combining the prayers is permissible if there is a sound excuse, but it is not permissible if there is no sound excuse. Hence, if a person combines the Thuhr and ‘Asr, for instance, at the time of the Thuhr without an excuse, then his ‘Asr prayer is invalid because it was performed before its prescribed time, so he must make up for it.
Allah knows best.
You can search for fatwa through many choices