This is testing my memory but, as I recall, Cameron never expected to get an outright majority and he promised an in out EU referendum to keep his Brexiteer supporters on board.
When he got the majority he had no choice.
Anyway, old news. Time to move on.