It was a dumb referendum because it pitted a specific, known option (remain in the EU) against a complete unknown. The unknown option won by cobbling together a coalition of several different, mutually exclusive agendas (some of which were/are based on fantasies, like the EU giving the UK free access to the common market while choosing which regulations it would follow), thus guaranteeing that there's probably no conceivable exit deal that more than 20% of the country (certainly nowhere near 52%) would be happy with, and even more than 80% will be unhappy with the one that is eventually negotiated.
You don't have to be pro-EU to see this as a bad way to run a country (although it helps).