They reached consensus on the obligatory nature of the appointment of the Imam, the only difference being as to whether it is obligatory on Allah or on people, with transmitted or intellectual evidence.
The position of the people of the Sunnah and the great majority of the Mu‘tazilah is that it is an obligation on people because of:
1. evidence transmitted in his words (ﷺ) in that which Muslim narrated in the hadith of Ibn ‘Umar () in this wording: “Whoever dies without an imam dies the death of the time of ignorance,”
2. and because the Companions () considered the most important of all matters to be the appointment of the imam to such an extent that they gave it precedence over his burial (ﷺ)
3. and because there is no avoiding the necessity of the Muslims having an imam who undertakes to execute their legal judgements, establish their ḥudūd limits, protect their borders, equip their armies, take their zakat (sadaqāt), conquer insurgents, thieves and brigands, establish the jumu‘ahs and the Eids, marry off young people who have no guardians, divide up the spoils of battle, and the similar duties of the Shari‘ah which individual members of the Ummah cannot take upon themselves.
[Mulla ‘Ali al-Qari, منح الروض الأزهـر في شرح الفقـه الأكبـر. Translated by Sidi Abdassamad Clarke]