Both Theresa and Boris wanted to lose the referendum
If Leave had gone down to a narrow defeat, Boris Johnson would have had all the power with none of the responsibility. He would also have had a senior Cabinet role for a year or two, and a chance to prove himself at that level. There’d be no immediate crisis to manage, and any trouble from Europe – and there would surely have been some – would play to his advantage.
With a narrow Remain win, Theresa May would probably have stayed at the Home Office (though there was a chance she’d have moved sideways to the Treasury or Foreign Office). George Osborne’s hopes would have been fatally wounded by the referendum, but other Remainers such as Stephen Crabb would have been well positioned to eclipse her. Turning 60 in October, it would have been easy to conclude that her time had passed.
The seismic Brexit vote and its aftermath changes everything. This is now extraordinarily close and it may be that the desire for stability and unity trumps the logic of letting a “Leaver” lead.