The rulers after the Prophet who were Companions did not care about their obligatory prayers صحیح مسلم سے ثبوت کہ جو صحابہ حضور کے بعد حکمران ہوے انہوں نے نماز کی پرواہ نہ کی

Narration in Sahih Muslim that the Prophet(pbuh) said to Abu dhar (ra) you would soon find after me rulers who would make their prayers dead

The Companions did not care about made the prayers dead their obligatory prayers

Another Narration

The Companions did not care about made the prayers dead their obligatory prayers - 2

We know who were the rulers after the Holy Prophet Abu Bakr, Umar bin Khattab, Uthman and Moawiya bin Abu Sufyan. We know that Abu dhar died in the time of third Caliph Uthman.Abu Dhar (rz) used to make objections on the actions of third Caliph. Uthman expelled him from Medina out in the desert. There in desert (RABZA) Abu Dhar (a righteous companion) of Holy Prophet died in miserable condition.

We also find in this narration that the Holy Prophet advised Abu Dhar to pray obligatory prayer alone on its time, when the other people pray later, you join with them for (the unity), that prayer will counted as your Nafal prayer.

From such narrations, we can also understand the action of Imam Ali ibn e Abu Talib, if Imam Ali joined with the other companions that was for the sake of unity, to save Islam and Muslim Ummah from the severe consequences.