Suppose we had a referendum on taxes. A simple question: should taxes be reduced or not? Polling evidence suggests that the resounding answer would be yes. But polling evidence also suggests that most voters would also say yes to more money for schools and the NHS. They might also say yes to reducing the deficit. Referenda do not need to respect constraints, which in this case is a simple budget constraint.
You might say that polls are a bad guide to what might happen in a real referendum on lower taxes. Those in the No campaign would point out that you cannot have over the longer term both lower taxes and higher public spending. But those arguing yes would say that lower taxes could be 'paid for' through greater efficiency in public spending. They might even say that lower taxes pay for themselves because the incentives they provide would lead to more growth and therefore more tax receipts. Most economists would say that this was highly unlikely, but we know economists will be ignored.
There was a similar constraint in the EU referendum. Reject free movement of labour and you cannot be part of the single market, and if you are not in the single market growth will suffer. Some might say that the success of the Leave campaign lay in making the EU referendum into a referendum on immigration, but as I argued before the campaign started this was always likely to happen. While the equation relating free movement to EU membership was straightforward and uncontested, the constraint relating free movement to the single market and growth was contested.
The real failure of Cameron and Osborne was not to forsee this would happen when they agreed to a referendum in the first place. They should have known, because they had managed to shut out economic expertise in the 'debate' over austerity. Their mistake, and perhaps arrogance and conceit, was not to realise that their opponents would do the same to them over Brexit.