Both sides were a bit loose with their integrity but the Remain campaign was lacklustre and lacked a narrative apart from fear of a calamitous collapse. As it turned out the majority of the public didn't think the politicians were as inept as they were being told they were by the politicians in terms of managing the future outside the E.U.
The UK is a parliamentary democracy. On significant matters of constitutional change a referendum is the least worst option. The details of laws are debated by elected representatives and voted on accordingly. It can be far from pretty and mistakes are made but the can be corrected also with subsequent new laws.