Britain’s flirtation with leaving the European Union is as puzzling as Greece’s stubborn desire to stay. After all, Britain’s economy has done quite well inside the bloc while Greece’s has been decimated.

What explains both sentiments is that the European project has always been about more than economics. It also seeks “an ever closer union among the peoples of Europe,” as the Treaty of Rome, its founding charter, declared in 1957.

“Closer union” with Europe deeply appeals to Greeks, whose own state has failed them so badly. But it repels many Britons, whose state works just fine and who want no part of a European political union. For them, the quagmire of the euro, which Britain hasn’t adopted, is a cautionary tale of what such a union could bring. How they decide between the economic benefits and political risks of staying could determine whether Britain votes to leave the EU in a June 23 referendum.

Greece joined the European Economic Community, the EU’s predecessor, in 1981, in search of shelter from foreign invaders, domestic coups, and its own dysfunctional government. Economics actually argued against membership: EEC technocrats said Greece wasn’t ready, but were overruled by political leaders worried about geopolitical instability on the Continent’s southern flank. The same logic brought Greece into the euro in 2001 when its debts and deficits should have disqualified it.

Greece’s underdeveloped, overprotected economy was poorly prepared for life inside the EU. A study led by Nauro Campos of Brunel University concluded only Greece was poorer in 2008 for having joined the EU; Britain, they reckon, was 24% richer. Eurozone membership initially brought down Greek interest rates and unleashed a borrowing binge but resulted in crisis and a six-year depression.

Yet Greeks still don’t want to give up the euro. “Anglo Saxons think the euro is only an economic and financial project,” said Yannis Stournaras, governor of the Greek central bank, in an interview. “It’s political as well. It’s a means to an identity. We feel safer in the euro.”

British considerations were just the opposite. A Conservative government took Britain into the EEC in 1973 largely for its trade benefits, a decision voters overwhelmingly approved in a 1975 referendum.

But Britain was always ambivalent about European jurisdiction beyond trade. Conservative prime ministers secured a rebate on its contribution to the EEC and opted out of the euro and the EU’s “social chapter,” which expanded EU jurisdiction into working conditions such as hours and maternity leave.

Today, party attitudes in the U.K. about the EU correlate with broader attitudes toward government. The Labour Party, which opposed membership in 1973, now supports it. The social chapter that Labour opted back into in 1998, “made the EU far more appealing to progressive people throughout Europe,” says Stewart Hosie, a member of Parliament for the leftist Scottish National Party. The SNP has threatened to seek another referendum on independence, as was rejected in 2014, if Britain leaves the EU.

Conservatives are torn because they want free trade but not the accompanying bureaucracy that touches on countless issues, from how much London’s bankers are paid to the value-added tax on women’s sanitary products.

Would leaving the EU make Britain economically better off? A report by several euroskeptic economists led by Patrick Minford at Cardiff University argues Britain could enrich itself by lowering trade barriers with countries such as China below levels the EU now permits. Politically, that looks like a stretch. Nor would it compensate for the loss of tariff-free access to Europe.

The British Treasury estimates the British economy would be 3.8% smaller outside the EU in 15 years’ time than inside if the country negotiates the same access to the EU that nonmember Norway now has, and up to 7.5% smaller if it doesn’t. This excludes the unknown but almost certainly negative impact of uncertainty as Britain negotiates its new arrangements.

Freedom from intrusive meddling from Brussels would be a relief, yet the economic harm of that meddling is easily overstated. Europe is clearly more regulated than Britain, but as Mr. Minford acknowledges, the EU itself is “pro-competitive in its policy philosophy.”

Where the euroskeptics have been consistently right is the euro. Britain’s decision to stay out, which both Labour and Conservatives now support, spared it the morass that has engulfed the Continent since 2009. To resolve the euro’s flaws, Europe’s top officials are now pressing for tighter political and fiscal union.

 

Euroskeptics say this means conflict between Britain and the rest of the EU is bound to grow. Britain must either stay in the EU to further its aims, “which include full monetary political and social union, or we decide to become an independent democracy again,” says John Redwood, a Conservative member of parliament and longtime euroskeptic. “I think staying is the chancier way of proceeding—a wild ride to political union.”

It was to meet just such criticisms that Prime Minister David Cameron in February extracted from other EU members stronger recognition of Britain’s right to stay out of the euro. It is now central to his argument that on June 23, Britain should vote to stay in the EU: in effect, that it can keep its economic benefits without its political baggage.