Earlier quoted context omitted.
> What's preventing the referendum from being declared stupid and that the UK gov't is not going to do it? Nothing except politics. The referendum is advisory and not legally binding. The Leave campaign has been found guilty of criminal offences. But actually, the referendum result is the closest thing May has to a mandate, her party won a minority in the parliamentary elections.
Correct, in fact the only force that the referendum has at all is that David Cameron promised to enact the result. But even this is old news, a past Prime Minister can hardly bind the hands of a future one! In fact the idea that a government can't bind a future government is an important part of Britain's ("unwritten") constitution.
https://www.parliament.uk/about/how/role/sovereignty
The subtly here is that usually a government commands an overall majority of Parliament, but weak/minority governments have to worry about government rebels.