The example of those who have chosen masters other than Allah is like that of the spider; it makes its house of web; and indeed the weakest house of all is that of the spider. How nice it would have been (for them) if they only knew.
[Kanz-ul-Iman (Translation of Quran)J (Part 20, Surah Al-‘ Ankaboot, Ayah 41)
A spider after spinning her cobweb, assumes that it is living in a secured house. But the condition of her house is such that it can neither protect her from sunlight nor from rain, it can neither protect her from hot weather nor from the cold weather and it destroys merely with a small puff of wind.
Same is the condition of the unbelievers that they have considered the idols as an authority to either benefit or harm them and have established faith in help and support from these idols. But in fact, no benefit or harm can be provided by the idols at all. The belief that the unbelievers have maintained regarding idol-worship is as weak as the cobweb. It would have been very good for them if they could have realised this fact.
Spider is a very strange creature. It has eight legs and six eyes. It is a very contented insect. However, the greediest of the insects like the flies and the mosquitoes are her food. A spider remains hungry and thirsty for several days but does not come out of her web to search for food. When a fly or mosquito gets trapped in her web, then it eats it. Otherwise, it stays in her cobweb bearing contentment and patience.
Among the virtues of the spider, there is one more thing that should not be
forgotten. At the time of migration, when the Holy Rasool was staying in the cave of Saur, a spider spun a web on the mouth of the cave and a female pigeon laid eggs there. Upon seeing this, the unbelievers returned assuming that if someone had gone inside the cave, then the eggs and cobweb would have been broken. (Tafseer As-Saawi, vol. 4, pp. 1564; part 20, Surah Al-‘ Ankaboot, Ayah 41)
It has been mentioned by Sayyiduna ‘Ali : Keep cleaning cobwebs from your homes, as these are a cause of misery and poverty.
(Tafseer Khazaain-ul-‘Irfan pp. 722; part 20, Surah Al-‘Ankaboot, Ayah 41)