The Prophet said: "Stoning the Jimari and Sa'i between As-Safa and Al-Marwah are only done for the establishment of Allah's remembrance." (Using translation from Tirmidhī 902)
عَنِ النَّبِيِّ ﷺ قَالَ «إِنَّمَا جُعِلَ رَمْيُ الْجِمَارِ وَالطَّوَافُ وَالسَّعْيُ بَيْنَ الصَّفَا وَالْمَرْوَةِ لِإِقَامَةِ ذِكْرِ اللَّهِ لَا لِغَيْرِهِ»