The Sunni-Shia division began as an argument about who should lead, not about what to believe, and the doctrinal differences accumulated afterwards to justify positions already taken.
When Muhammad died in 632 he left no undisputed instruction about succession. A gathering of Medinan and Meccan leaders acclaimed Abu Bakr, his close companion and father-in-law, as caliph. A party held that the Prophet had designated Ali, his cousin and son-in-law, and that leadership belonged in his household. Ali did eventually become the fourth caliph, and the Sunni position honours all four of the first caliphs, Abu Bakr, Umar, Uthman and Ali, as rightly guided. It is the acceptance of the first three, rather than any judgement about Ali, that most sharply divides Sunni from Shia.
The Sunni principle is that authority passed to those chosen by the consensus of the community, and that the Prophet's companions collectively are trustworthy transmitters. From that follows the enormous weight Sunni Islam gives to the hadith, the reports of what the Prophet said and did, and to the sciences developed to test their chains of transmission. The two collections of al-Bukhari and Muslim hold particular standing.
The name itself, ahl al-sunna wa-l-jamaa, the people of the practice and the community, makes the claim: this is the Islam of the mainstream and the majority, defined by adherence to the Prophet's example and by refusal to break communal unity. That emphasis on unity is itself doctrinally significant. Sunni jurisprudence has generally preferred an unjust ruler to civil strife, a preference formed in the aftermath of the early civil wars and which has shaped Sunni political thought since.