According to Quran (6:124):
But Allah knows best where to place His Message
you see that Allah chooses Prophts or Imams to deliver his message. And according to Quran (53:1-4):
your companion is neither astray, neither errs,nor does he speak out of desire. Indeed it is not except a Revelation which is revealed
it is God who directs prophet to do whatever he does. so when in the Hadith of Jabir b. 'Abd Allah we read:
After the revelation of Uli l-Amr Verse, Jabir b. 'Abd Allah al-Ansari asked the Prophet (s): "O the messenger of God! We know God and His messenger; but we need to know the Uli l-Amr." The Prophet (s) replied: "they are my successors and the imams of Muslims after me. The first is Ali b. Abi Talib, and then Hasan, Husayn, Ali b. al-Husayn, and Muhammad b. Ali known in the Torah as "Baqir", whom you will see at an old age, and whenever you see him, send my regards to him. After Muhammad b. Ali, Ja'far b. Muhammad, Musa b. Ja'far, Ali b. Musa, Muhammad b. Ali, Ali b. Muhammad, Hasan b. Ali, and then his son who is my namesake and has the same kunya as mine. He is the one who will hide from people's view, and his occultation will be so long that only people with firm beliefs will continue to believe in him"
that means god has chosen 12 and only 12 specific person as Imams or Khalifas after prophet and directed him to introduce them to others.
visit : http://en.wikishia.net/view/Hadith_of_Jabir_b._%27Abd_Allah#cite_note-1