I don't think the UK government explained very well to its citizens the benefits of remaining in the EU.
From a purely business perspective, the unencumbered flow of capital and labor from the EU into the UK (one of the biggest economies in Europe) and vice versa is actually a godsend. The flow of capital generally means higher margins for businesses (and investors) and greater revenue for the government. It was more beneficial to the UK when it didn't even have to adopt the Euro as its national currency (which meant it could easily maintain its payments on its sovereign debt as the pound was still stronger than the euro). The flow of skilled workers into the UK (on a permanent basis) was also regulated by the Home Office having to approve work permits only for foreigners with skills that couldn't be sourced locally. It also helped with lower-skilled jobs that many British citizens might not want to do (meaning it would be easier to absorb a recession shock, provided people don't look at stuff through the lens of "identity politics"). It really was a win-win situation.
It's much more complicated than this but this is just a broad overview of some of the multiple issues that Brexit caused.
Obviously, no one can properly quantify the effects of Brexit but the UK government having to spend money to restimulate the economy with the fall of FDI (due to Brexit) in the UK isn't good. Then having the most recent PM talk about cutting taxes looks like total insanity (hence the markets reacting the way they did).