Why Do Muslims Fast the day of 'Ashura?
Question

Why was the day of 'Ashura made for Moosa (peace be upon him) only, and no day was made for Muhammad (blessings and peace of Allah be upon him) or for ‘Eesa (peace be upon him)?
Praise be to Allah.The reason for fasting on the day of 'Ashura
It was narrated that Ibn ‘Abbas (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) came to Madinah, and he found the Jews fasting on the day of 'Ashura. They were asked about that and they said: This is the day on which Allah granted victory to Moosa and the Children of Israel over Pharaoh. We fast on this day out of respect for it. The Prophet (blessings and peace of Allah be upon him) said: “We are closer to Moosa than you,” and he enjoined fasting on that day. Narrated by al-Bukhaari (3943) and Muslim (1130).
The day of 'Ashura is one of the significant days on which the Prophet (blessings and peace of Allah be upon him) prescribed we should fast. This day is not for Moosa (peace be upon him); rather it is for the saving of the believers. The reason for fasting it is that it is the day on which Allah saved Moosa and drowned Pharaoh and his troops, and there covered them from the sea that which covered them (cf. 20:78). So the Prophet (blessings and peace of Allah be upon him) fasted on this day, and he enjoined the Sahaabah to fast on this day too, by way of following the example of Moosa (peace be upon him) and out of gratitude to Allah, may He be exalted. When Allah enjoined fasting the month of Ramadan, this ruling was abrogated, and fasting on this day became Sunnah.
Abu’l-‘Abbas al-Qurtubi said: It may be said that Allah, may He be exalted, gave him permission to fast on this day. When he came to Madinah he found the Jews fasting on this day, and he asked them what made them fast on this day? And they answered in the manner mentioned by Ibn ‘Abbas, that it was a significant day, on which Allah saved Moosa and his people, and drowned Pharaoh and his people. So Moosa fasted on this day as an act of gratitude, and we also fast on this day. The Prophet (blessings and peace of Allah be upon him) said: “We are more deserving of being closer to Moosa than you.” So at that time he fasted on this day in Madinah and instructed (the Muslims) to do likewise. In other words, he enjoined fasting on this day and emphasized the importance of doing so, to the extent that they would also make the children fast. The Prophet (blessings and peace of Allah be upon him) adhered to that, as did his Companions, until fasting the month of Ramadan was enjoined, and the obligation to fast on the day of 'Ashura was abrogated. At that time, he said: “Allah has not prescribed for you to fast this day.” Then it was made optional to fast on this day or not, but it remains an act of virtue, as the Prophet (blessings and peace of Allah be upon him) said, “But I will fast on this day,” as is mentioned in the hadith of Mu‘aawiyah.
Based on that, the Prophet (blessings and peace of Allah be upon him) did not fast on the day of 'Ashura in imitation of the Jews, because he used to fast on this day before he came to them, and before he knew about them. Rather what happened when he came to Madinah was that he enjoined it and adhered to it by way of seeking to soften the Jews’ hearts and win them over, as was also the reason for facing their qiblah. This was the time at which the Prophet (blessings and peace of Allah be upon him) liked to be in harmony with the People of the Book in matters concerning which there was no prohibition on doing so. End quote from al-Mufhim lima ashkala min Talkhees Kitaab Muslim (3/192).
Secondly:
Quraysh used to venerate the day of 'Ashura
Ibn al-Qayyim said: Undoubtedly Quraysh used to venerate this day, and they used to cover the Ka‘bah on this day, and fasting on this day is part of venerating it. But they used to work out the months by sighting the new moons, so for them, that day was the tenth of Muharram. When the Prophet (blessings and peace of Allah be upon him) came to Madinah, he found the people venerating this day and fasting thereon, so he asked them about it, and they said: It is the day on which Allah saved Moosa and his people from Pharaoh. The Prophet (blessings and peace of Allah be upon him) said: “We are closer to Moosa than them,” so he fasted on this day and enjoined the Muslims to fast, in an affirmation of the significance of this day. And he (blessings and peace of Allah be upon him) stated that he and his ummah were closer to Moosa than the Jews; if Moosa fasted on this day out of gratitude to Allah, then it is more appropriate that we should follow his example more than the Jews, especially if we say that what was prescribed for those who came before us is also prescribed for us, so long as what is prescribed for us does not contradict it.
If it is asked: how do you know that Moosa used to fast on this day? We say: It is proven in as-Saheehayn that when the Messenger of Allah (blessings and peace of Allah be upon him) asked them about it, they said: It is a significant day on which Allah saved Moosa and his people, and drowned Pharaoh and his people, so Moosa fasted on this day out of gratitude to Allah, and we also fast on this day. The Messenger of Allah (blessings and peace of Allah be upon him) said: “We are more deserving of being closer to Moosa than you”; so he fasted on this day and enjoined (the Muslims) to fast too.
Because he approved of what they said and did not say that they were telling lies, it is known that Moosa fasted on this day out of gratitude to Allah, so this  added to the esteem in which this day was held before the Hijrah, and thus it became even more emphasized, to the extent that the Messenger of Allah (blessings and peace of Allah be upon him) sent a caller to call out in different parts of Madinah, instructing people to fast on this day, and instructing those who had eaten to refrain from eating for the rest of the day. What appears to be the case is that this was emphatically enjoined upon them and made obligatory."(Zaad al-Ma‘aad  2/67).
For more information on the Day of 'Ashura and related matters, please see the answers to questions no. 128633  and 21775 .
Thirdly:
Moosa fasted the day of  'Ashura as an act of gratitude to Allah
We do not understand what is meant in the question, why did Allah make the day of 'Ashura for Moosa…? If the question is about fasting, Allah has prescribed fasting for this ummah, more than what was prescribed for those who came before us, and the month of Ramadan is the month of Ramadan.
If the question is about showing gratitude, then it is well known that the Prophet did acts of gratitude to the Lord of the Worlds, and he would stand in (voluntary) prayer at night until his feet swelled. He was asked about that, and he said: “Should I not be a grateful slave?”
Such was the fast of Moosa (peace be upon him) and the believers who were with him; it was an act of gratitude to the Lord of the Worlds, for saving them from the enemy of Allah Pharaoh and his troops, by means of this great miracle, and the Jews fasted on this day after that. The Prophet (blessings and peace of Allah be upon him) said that in fact the ones who should really rejoice over that and give thanks to Allah for this blessing are the believers, namely the Prophet (blessings and peace of Allah be upon him) and those who were with him, because they are closer to Moosa than those who opposed him, did not adhere to his law, and did not believe in Muhammad (blessings and peace of Allah be upon him), for the Prophets took the pledge from their people that they would believe in him and follow him.
Moreover, the power of prescribing laws belongs to Allah alone; He prescribes for His slaves whatever He wills and chooses for them. He gives to some of his Prophets what he does not give to others. This is something that is well known and well established. Allah, may He be exalted, says (interpretation of the meaning):
“And your Lord creates what He wills and chooses; not for them was the choice. Exalted is Allah and high above what they associate with Him” [Al-Qasas 28:68]
“Those messengers - some of them We caused to exceed others. Among them were those to whom Allah spoke, and He raised some of them in degree. And We gave Jesus, the Son of Mary, clear proofs, and We supported him with the Pure Spirit” [Al-Baqarah 2:253]
“And your Lord is most knowing of whoever is in the heavens and the earth. And We have made some of the prophets exceed others [in various ways], and to David We gave the book [of Psalms]” [Al-Isra’ 17:55].
If we assume that Moosa’s fasting on this day was one of his special virtues, and the virtue of fasting on this day was emphasized by the fact that the Prophet (blessings and peace of Allah be upon him) and his ummah fasted on this day, and it is made clear that it is more appropriate for them, rather than any other nation, to give thanks for the blessing that Allah bestowed upon Moosa, then is it appropriate for the Muslim to ask his Lord why He favoured His Prophet Moosa and singled him out for this virtue to the exclusion of other Prophets? Is there any wisdom behind this question, or any rational or legitimate reason for asking it? Or does it come under the heading of inquiring into matters which do not benefit a person in either his religious or worldly affairs? The Lord of the Worlds, may He be exalted, says, glorifying Himself (interpretation of the meaning):
“So exalted is Allah, Lord of the Throne, above what they describe.
He is not questioned about what He does, but they will be questioned” [Al-Anbiya’ 21:22-23].
And Allah knows best.