there is no "hadith" to this, the prophet NEVER SAID something like "after me, abu Bakr will rule, then Umar, then, uthman, then Ali, then Hasan..."
we know it from historical records
its exactly the same like we know that Charles de Gaulle was president of france, Ivan the terrible was czar of russia, we know it from historical records, they were democratically elected, they were not chosen by the prophet (PBUH) as rulers after him, although he did give them the hgighest of praises, among other people.
Peace