" what was the point of it to take the question to the electorate ?"
The point was, that Cameron thought that
1. By offering a referendum, he could win the election by preventing Tory voters from voting UKIP. It worked. If just a small percentage had voted UKIP instead of Tory, he'd have lost.
2. He could easily persuade enough people to vote Remain. It failed because he reckoned without the two old men (Murdoch and Dacre) who tell the majority of people in Britain, how they should vote.