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.
The Hadeeth that you mentioned was narrated by Imaam Ahmad in Al-Musnad and Ibn Hibbaan in his Saheeh on the authority of Abu Hurayrah who said that the Messenger of Allah, sallallaahu ‘alayhi wa sallam, said: “The Hour will not come until rain descends on people so heavily that no mud-brick houses would offer any protection against it and only houses made of camel hair would offer protection against it.” [Ahmad Shaakir and Shu‘ayb Al-Arnaa’oot: Saheeh (authentic)] Al-Albaani classified it as authentic in Silsilat Al-Ahaadeeth As-Saheehah, no. 7/795, and said: “You should know that its apparent indication contradicts what was mentioned in the Hadeeth narrated by An-Nawwaas ibn Sam‘aan about the story of Ya’jooj and Ma’jooj (Gog and Magog), stating that Allah, The Exalted, will destroy them so much that there will not be on the earth as much space as a single span which is not filled with their putrefaction and stench. The Hadeeth mentions: ‘Then Allah will send upon them rain which no house of mud or tent of camel hair keeps out, and it will wash clean the earth until it looks like a mirror.’ [Muslim and others] This Hadeeth was previously referenced under no. 481 and 1780. His saying, ‘or tent of camel hair,’ contradicts his saying in the Hadeeth in reference, ‘except for tents of camel hair.’ Perhaps that will be at two different times.” [End of quote]
The Hadeeth was narrated by Ash-Shaafi‘i in his Musnad (p. 83) with the following wording: ‘Madeenah will soon witness a rainfall against which its houses would offer no protection except for tents made of camel hair.’” [End of quote]
The Hadeeth commentators explained the reason why the tents made of camel hair will survive such rainfall, unlike the mud-brick houses, highlighting that mud dissolves because of rain, and accordingly rain water enters the houses, unlike the tents made of camel hair, which, if firm and fixed, are not destroyed by rain. Ibn Al-Atheer said in his book Ash-Shaafi Fi Sharh Musnad Ash-Shaafi‘i (2/361): “He said, ‘against which its houses can offer no protection except for tents made of camel hair,’ because their houses at that time were built of mud and were demolished in the event of multiple rounds of heavy rain. If they kept the rain out, the water would gather on the rooftop and the roof would leak on them, and thus such mud-brick houses provided no shelter against rain. As for the tents made of camel hair, as long as they are firm and fixed in place with pegs, they survive the constant rainfall and do not collect rainwater, and this is evident and observed in real life.” [End of quote]
As-Sindi said in his commentary on Musnad Ash-Shaafi‘i – Tarteeb As-Sindi (1/393): “Because the mud-brick houses dissolve by heavy rain and are demolished as a result. This is explained by the other version of the Hadeeth stating that the heavy rain will last for forty nights. As observable in our Egyptian villages, houses would not survive heavy rain for a period of quite less than that stated in the Hadeeth. This Hadeeth is one of the texts in which the Prophet, sallallaahu ‘alayhi wa sallam, informed us of future events, which is miraculous since what he had said was happening exactly as he had described it.” [End of quote]
Allah Knows best.