Praise be to Allah.
It is Sunnah for men to run between the two markers in sa‘i, because this is what was done by the Prophet (blessings and peace of Allah be upon him) and the Sahaabah (may Allah be pleased with them) after him. The Prophet (blessings and peace of Allah be upon him) said: “Learn from me your rituals (of Hajj).” Narrated by Muslim (1297) from Jaabir. Women, however, do not run, because they are required to cover themselves and be modest, and running may expose their bodies and their charms.
This has been discussed previously in the answer to question no. 109286
The reason why men run – as was mentioned by Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) – is that in this place there was a valley, i.e., a channel for rainwater, and a valley is usually steep and sandy, so it is difficult to walk normally in it, so one has to run. The purpose behind sa‘i is to remember the story of the mother of Ismaa‘eel: when Ibraaheem (peace be upon him) left her (may Allah be pleased with her) and her son in this place, and he left a skin of water and a bag of dates with her; the mother began to eat the dates and drink the water, and she breastfed her son. Then the water and dates ran out, so she became hungry and thirsty, and her milk dried up. The infant became hungry, and began to cry with hunger. She found herself in a difficult position. She saw that the nearest mountain to her was as-Safa, so she went to as-Safa and began to listen out in the hope that she would hear someone, but she heard no one. So she came and headed the other way, towards al-Marwah. When she came down to the bottom of the valley, she could no longer see her son, so she started running fast, until she climbed up so that she could see her son. She climbed up to listen out from al-Marwah, but she did not hear anything. She continued like this until she had done this seven times. Then she heard a sound, but she did not know what it was. Then she saw that Jibreel had come down by Allah’s command, and he struck the ground with his wing or his foot in the place where Zamzam is now…
See: ash-Sharh al-Mumti‘ (7/269)
And Allah knows best.