Hadith.2135 - The command to throw the pebbles (Ramy al-Jamarat) was given because Iblis, the accursed, would appear to Ibrahim (as) at the locations of the Jamarat, and Ibrahim (as) would pelt him with stones. Thus, it became a tradition.
It has also been narrated that the
first to throw the pebbles was Adam (as) followed by Ibrahim, peace be upon him.