That wasn't a referendum to join the Common market/EEC/EU. We were already a member - the referendum was on whether we should remain a member or leave.
IIRC:
We joined after a number of failed attempts - having lost the Empire and failing to build the Commonwealth as a cooperative trading block.
Even after joining the UK limped along as the "sick man of Europe" until, ironically, the benefits of EEC trade kicked in under the Thatcher government.
The EEC was needed to rebuild industry in Western Europe after obliteration in WWII, and has grown in influence and power ever since, helping pull Southern and Eastern Europe out of poverty.
It has had it's faults and made errors along the way, but so do all cooperative endeavours.