Sunnis say that why Hadrat “Ali” [AS] didn’t announce the Imamate of Hadrat “Hasan” [AS] and in response to those who asked him if we swear allegiance with Imam “Hasan” [AS] or not, Hadrat “Ali” [AS] said that choose is yours if you want you can do so.
That Imam “Ali” [AS] has willed and selected Imam “Hasan” [AS] as his successor is amongst the definitive matters of the history and even Sunni scholars have admitted it. Since you asked this question from the perspective of Sunni I just say issues from Sunni books and other wise no Shia has doubted this matter.
“Ibn Kathir Damascene Salafi” writes:
ثمّ بعدهم الحسن بن علي لانّ عليّاً أوصي اليه و بايعه أهل العراق.
After former caliphs, “Hasan ibn Ali” became caliph because “Ali” willed that he is Imam and people of “Iraq” swore allegiance with “Hasan ibn Ali”.
“Al-Bidayah wa’i-Nihayah” – vol. 6 – p 249
“Abu al-Faraj Isfahani” quotes from “Abu al-Aswad Dueli”:
“و قد أوصي بالامامة بعده الي ابن رسول الله و ابنه و سليله و شبيهه في خلقه و هديه”
“Ali” willed that his son who was similar to him in terms of morality is the next Imam.
“Al-Aghani”- vol. 12 – p 380
“Ibn Abd Rabbih Andualusi” writes:
“قال هيثم بن عدي أدركت من المشايخ أنّ علي ّ بن ابيطالب أصار الامر الي الحسن”
Many of elders that I met told me that “Ali ibn abi Talib” abdicated caliphate to his son.
“Al-ʿIqd al-Farīd” – vol. 4 – p 475
“Ibn A’isam Kufi” narrates that Imam “Hasan” said in his letter to “Muawiyah”:
Commander of the faithful Ali ibn abi Talib appointed me as the caliph of Muslims when on the point of dying.
“Al-Futuoh” vol. 4 – p 278