Why did the Prophet, sallallaahu ‘alayhi wa sallam, not order the Companions to fast the ninth of Muharram except a year before his death, despite the fact that the Jews left Madeenah a long time before this?
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, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The answer of this question was mentioned by Al-Haafith Ibn Hajar, may Allah have mercy upon him, as he said,
Ahmad narrated this Marfoo‘ Hadeeth (i.e., directly attributed to the Prophet, sallallaahu alayhi wa sallam,) on the authority of Ibn ‘Abbaas: 'Fast the tenth of Muharram and contradict the Jews by fasting one day before it or after it.' This was at the end as the Prophet, sallallaahu ‘alayhi wa sallam, used to do the same as the People of the Book in matters where he was not ordered to do otherwise, especially when this would be contradicting the idolaters. However, when Makkah was conquered and Islam became widespread, the Prophet, sallallaahu ‘alayhi wa sallam, liked differ from the People of the Book, as what was narrated in As-Saheeh. The Prophet, sallallaahu ‘alayhi wa sallam, did as the People of the Book did initially, then later said: 'We are worthier of Moosa than them.' Then he liked to be different from them and ordered us to add one day before it or after it.
Thus, the Prophet, sallallaahu ‘alayhi wa sallam, intended to fast the ninth of Muharram to be different from the Jews when Islam was widespread and its followers became many, but before this he used to do the same as the People of the Book in matters that do not include order or forbiddance from Allah The Almighty.
Allah Knows best.