Here’s a popular joke doing the rounds in my country at the moment. Three Bulgarian men, dressed in traditional Japanese costume and armed with swords, are walking down a street in Sofia. One of the passersby asks them who they are and what they want.

“We are the seven samurai and we want to make this country a better place,” say the men.

“Why are there only three of you then?”

“The other four are all working abroad.”

The impact of immigration from eastern Europe on the UK has generated a heated debate in Britain over the last few years. What is largely ignored in the flurry of arguments, however, is the extent to which immigration is also changing the societies migrants are coming from. Bulgarian daily 24 Chasa recently calculated that more than 3 million Bulgarians had left the country in the past 23 years and stayed away – a momentous demographic change for a country with a population now slightly above 7 million.

This ignorance has bred a number of lazy assumptions. One is the idea that emigrants are mainly people who would otherwise remain unemployed in their home country: migration allows them to find a job that then helps subsidise their relatives at home, thus improving the overall macroeconomic picture in eastern Europe.

In fact the reality is much more complex. Opening of the borders was both the best and the worst thing that has happened to Bulgarian society after the fall of the Berlin Wall. “I can only love what I am free to leave,” wrote East German dissident Wolf Biermann in the 1970s. For half a century Bulgarians were asked to love a country they were not free to leave, so opening the borders was unmistakably a welcome development. But since the borders have opened, a different question has posed itself: how do you change a country that you dream of leaving?

Mass emigration of people mostly aged between 25 and 50 has dramatically hurt the Bulgarian economy and its political system. Businesses complain about a shortage of qualified labour. Bulgaria’s health system is deprived of well-trained nurses who can earn several times more by taking care of a family in London than working at a low-paid local hospital. Most of our best graduates do not apply to study at Bulgarian universities, thus depriving them of talent: after the Chinese, Bulgarians are now the second biggest foreign student community in Germany. And although most of those who leave plan to come back, completing that plan often proves more difficult. People who leave their home country early in their lives are less likely to have social networks that would lure them back home again. And if they do come back, they often find their welcome to be less enthusiastic than expected: out of sight is out of mind. In Bulgaria, returning home is still often associated with failure to make it big in the wider world.

Another lazy assumption about eastern European migration is that it has made countries like Bulgaria a more liberal place. Living abroad in multicultural societies like Britain has opened millions of Bulgarian minds, the argument goes.

Yet you only have to read the blogs and Facebook posts of many Bulgarians living abroad see once experience–hungry east European immigrants transform into anti-immigrant xenophobes when it comes to how Bulgaria should deal with foreigners.

At worst you could argue that mass emigration is one of the main reasons why Bulgaria has been governed by the wrong people in recent years. Brilliantly talented individuals have undoubtedly benefited from the opening of borders, but so have at least two other groups: bad eastern European politicians and xenophobic western European parties.

How do you change a country that you dream of leaving?

In his classic book Exit, Voice and Loyalty, the American social scientist Albert Hirschman contrasted the two strategies that people have for dealing with poorly performing institutions. People can either “exit”– voting with their feet, expressing their displeasure by taking their business elsewhere – or they can decide to voice their concerns, choosing to fight for reform from within.

Hirschman knew that in most cases exit works well as a pressure for change but he also pointed out that “those who hold power in the lazy monopoly may actually have an interest in creating some limited opportunities for exit on the part of those whose voice might be uncomfortable.” Exit can bring reform, but under certain conditions it can also become a major obstacle for reforming society.

The mass anti-government protests that took place in Bulgaria in 2013 perfectly captured this paradox: protesters may have been shouting “We do not want to emigrate”, but in the end some of them did, because ultimately it is now easier to go to Germany than to make Bulgaria function like Germany. When some of the most active and critical citizens leave only three samurais are left to struggle for change. Going by the current level of corruption and poor political leadership in Bulgaria, this is not enough.

So could giving in to British calls to curb freedom of movement be a blessing in disguise for Europe’s east? Not so fast. A survey published last year to coincide with the 25 anniversary of the fall of the Berlin Wall, tried to establish the gains and losses of the post-communist transition in the eyes of the public.

The results came as a shock to many politicians: while the overwhelming majority of Bulgarians still support their country’s membership of the EU, many tend to view the last two decades as a failure rather than a success.

They see their country’s arrival in Europe through a prism of de-industrialisation, rising social inequality and corrupt elites. And yet freedom of movement emerged from the survey as the one unqualified success of the past 25 years. It is the one thing that makes people still believe that the EU has a future. Europe’s leaders thus face a dilemma: curbing freedom of movement may help to keep the UK in the EU, but it runs the risk of delegitimising the project in the eyes of its newer members.