Thus social and individual laws like marriage contracts...
Thus social and individual laws like marriage contracts, divorce, selling and buying, taking, giving, inheritance, zakat and everything that concerned the individual and the society as a whole, in war and in peace, transactions and acts of worship came under the laws of Allah. The role of the Apostle (S.A.W.) was to ensure the implementation and application of those laws.
Naturally, the Prophet of Allah (S.A.W.) used to think about who he would appoint as his successor for this important role since it involved the leadership of the umma . It is natural that every head of state (if he cares about his people) pay special attention to the person whom he has selected to be his deputy on every occasion that he himself is absent from; he becomes his first minister as well as his close confidant who is present when other people are absent.
It is also natural that his deputy be well known to all the ministers, as well as to the people at large. The intellect cannot believe that the Prophet of Allah (S.A.W.) was heedless of all this and paid no attention to it. There is no doubt that it was uppermost in his mind, just as there is no doubt that the hadiths related to the topic were subjected to the restrictions imposed by the Caliphs who maintained the theory of consultation.
They spent all their efforts in contradicting the texts which specified and identified the Caliph. Part of this effort was the denigration of the sanctity of the Prophet (S.A.W.) and accusing him of hallucination. The denigration was directed to him as well as to the leader whom he had appointed to lead the army, for they claimed that he was not fit to be the leader and amir due to his young age.
Then they created doubt about the death of the Prophet of Allah (P) so that the matter becomes confusing and the people do not proceed to pledge allegiance to the Caliph who the Prophet of Allah (S.A.W.) had previously appointed. As a part of that effort, they used the opportunity, while 'Ali and his helpers were busy with the preparations for the Prophet's burial, to hold an emergency meeting at Saqifa for selecting one whom they were pleased and comfortable with and in whom their hopes lay.
They then coerced the people, by threats and promises, into taking the pledge of allegiance and they completely removed any opposition from the political field.