Why did the Prophet observe fasting on the tenth of Muharram?
All perfect praise be to Allah, the Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His Slave and Messenger.
The Messenger of Allah would fast certain days apart from those in the month of Ramadan and among these days was the tenth of Muharram. Mu‘aawiyah, may Allah be pleased with him, said: "I heard the Messenger of Allah saying: 'This is the tenth of Muharram and fasting it is not obligatory for you, but I am fasting, so whoever wants to fast, he may fast and any one who does not want to fast may do so.’" [Al-Bukhari and Muslim]
The Prophet observed fasting on this day because Moosa, may Allah exalt his mention, would observe fasting on it as this is the day when he was saved from Fir`awn (Pharaoh) by Allah. Ibn ‘Abbaas, may Allah be pleased with him, said, "When the Messenger of Allah came to Madeenah, he found the Jews fasting the tenth of Muharram (‘Aashooraa). He asked about this and they said, 'It is a good day on which Allah saved Moosa (Moses) and (his people) the children of Israel from their enemy (Pharaoh) and Moosa used to fast it.‘ Upon this the Prophet said: 'I am worthier of Moosa than you.' He thus observed fasting and commanded people to observe fasting on this day." [Al-Bukhari and Muslim]
Abu Moosa Al-Ash‘ari may Allah be pleased with him, said, "The Day of ‘Aashooraa’ was glorified by the Jews and regarded as a feast. The Messenger of Allah said: 'You (Muslims) should fast this day.'" [Al-Bukhari and Muslim]
Allah Knows best.