[Machine] In the pre-Islamic era, the devils used to play music all night long between Safa and Marwa. They had idols, which they worshipped. When Islam came, the Muslims said to the Prophet Muhammad, "O Messenger of Allah, we will no longer perform the rite of Sa'y (walking) between Safa and Marwa, as it is something we used to do in the pre-Islamic era." Then Allah revealed the verse, "Indeed, as for those who perform Hajj to the Ka'bah or 'umrah, there is no blame upon them for walking between them" (Quran 2:158). This means that there is no sin upon them, but they will be rewarded.
فِي قَوْلِهِ تَعَالَى {إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ اللَّهِ} [البقرة 158] قَالَ كَانَتِ الشَّيَاطِينُ فِي الْجَاهِلِيَّةِ تَعْزِفُ اللَّيْلَ أَجْمَعَ بَيْنَ الصَّفَا وَالْمَرْوَةِ وَكَانَتْ فِيهَا آلِهَةٌ لَهُمْ أَصْنَامٌ فَلَمَّا جَاءَ الْإِسْلَامُ قَالَ الْمُسْلِمُونَ يَا رَسُولَ اللَّهِ لَا نَطُوفُ بَيْنَ الصَّفَا وَالْمَرْوَةِ فَإِنَّهُ شَيْءٌ كُنَّا نَصْنَعُهُ فِي الْجَاهِلِيَّةِ فَأَنْزَلَ اللَّهُ {فَمَنْ حَجَّ الْبَيْتَ أَوِ اعْتَمَرَ فَلَا جُنَاحَ عَلَيْهِ أَنْ يَطَّوَّفَ بِهِمَا} [البقرة 158] يَقُولُ لَيْسَ عَلَيْهِ إِثْمٌ وَلَكِنْ لَهُ أَجْرٌ