"I recited to Aishah: 'So it is not a sin on him who performs Hajj or Umrah (Pilgrimage) of the House to Perform the going Tawaf) between them (as-Safa and Al-Marwah) "I said: 'I do not care if I do not go between tham?' She said: 'What a bad thing you have said!' People at the time of the Jahiliyyah used not to go between them, but when Islam came and the Quran was revealed: 'Verily, As-Safa and Al-Marwah are of the symols of Allah, the Messenger of Allah went between them, and we did that with him, and thus it became part of Hajj.'" (Using translation from Nasāʾī 2967)
بِئْسَ مَا قُلْتَ إِنَّمَا كَانَ أُنَاسٌ مِنْ أَهْلِ الْجَاهِلِيَّةِ لَا يَطُوفُونَ بَيْنَهُمَا فَلَمَّا كَانَ الْإِسْلَامُ وَنَزَلَ الْقُرْآنُ {إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَائِرِ اللهِ} [البقرة 158] الْآيَةَ «طَافَ رَسُولُ اللهِ ﷺ وَطُفْنَا مَعَهُ فَكَانَتْ سُنَّةً»