WHEN TENG PENGFEI was 16, he asked his parents for money to travel around China. They refused, so he threatened to get on his bike and pedal hundreds of miles to Beijing anyway. “You can’t stop me,” he told them. They paid up.

After school he went to Griffith University in Australia. He was an only child, and at first his parents provided financial support. Eventually he earned enough from part-time jobs to pay his own bills. He imported exercise machines from China and sold them on eBay, making “quite a lot of money”.

He moved back to China because his parents were unwell—a common reason for returning—and found a job in a bank, but did not enjoy it. So he left and started his own company. He now manages TNT Partners and CareerFrog, firms that help Chinese who study abroad find jobs back in China.

Young adults like Mr Teng are more mobile than any other age group. They are old enough to leave the parental home but have not yet acquired a family of their own to tie them down. They can fit their lives into a small bag—especially now that their book and music collections are stored in the cloud—and catch the next bus to adventure. A global Gallup poll found that 19% of 15-29-year-olds wanted to move permanently to another country—more than twice the proportion of 50-64-year-olds and four times the share of over-65s who felt the same way (see chart). Young adults are more footloose within their own country, too. The average American moves house 6.4 times between the ages of 18 and 45 but only 2.7 times thereafter, the census shows. And in developing countries, young people are 40% more likely than their elders to migrate from the countryside to a city. Such mobility is a good thing. In the absence of a war or flood, it is voluntary. People move because they think they will be better off elsewhere. Usually they are right. If they are wrong, they can always return home. Moving tends to make people more productive, especially if it is from a poor country to a rich one. Michael Clemens of the Centre for Global Development, a think-tank, estimates that if a typical migrant from a poor to a rich country is allowed to work, he can earn three to five times more than he did at home. (And this assumes that he learns no new skills, though he probably will.) To win such a prize, migrants will take huge risks. A study by Linguère Mbaye of the African Development Bank found that those heading from Senegal to Europe were prepared to accept a 25% chance of dying in the attempt.

Moving tends to make people more productive, especially if it is from a poor country to a rich one

If all international borders were completely open, global GDP would double, Mr Clemens estimates. For political reasons, that is very unlikely to happen. In America, liberal immigration bills die in Congress. In Europe, the surge of refugees from Syria and the Paris terror attacks have reinvigorated xenophobic political parties and jeopardised free movement within the EU.

Voters fret that some immigrants might be terrorists, which very occasionally turns out to be true. They also fear that the incomers will poach jobs from the native-born. Some studies find that unskilled migrants depress pay by a tiny amount for unskilled locals. But overall immigrants bring complementary skills, new ideas and entrepreneurial zest, so they tend to boost growth. Also, because they are mostly young, healthy and working, they typically pay more in taxes than they receive in benefits.

Movement within countries follows a similar pattern. Migrants, again mostly young, go where the best jobs are. This has led to rapid urbanisation. Today 54% of the world’s people live in cities, up from 30% in 1950. The UN predicts that by 2050 the proportion will rise to 66%. Poor countries are urbanising fastest because they started off more rural. In sub-Saharan Africa 64% of young people who work scratch a living from the soil; in South Asia it is 45%. Almost any city job pays better than work on the land: in developing countries, non-farm workers add four times as much value as agricultural workers. In China, urban wages are three times rural ones.

Westerners looking at the crowded shantytowns around Manila or Nairobi cannot imagine why anyone would leave a picturesque village to live there. Migrants see it differently. They are giving up lives of back-breaking toil, stifling tradition and periodic hunger. They are moving to places with bright lights, better wages and infinite variety. Victor Daniel left Yobe, a cotton-growing state in Nigeria, and moved to Lagos, the country’s commercial capital, when he was 18. Now he works in a bar for $110 a month plus a bed. “I needed to find my own freedom,” he says. “Life is better in Lagos.”

In rich countries young people—especially the brightest—are clustering in big, vibrant cities. A quarter of Londoners are aged 25-34, for example, nearly twice the share in the rest of England. A survey of students at Harvard found that only 26% planned to return to their home state after graduation; 64% planned to work in New York, California, Massachusetts or Washington, DC.

Networks and soulmates

In the knowledge economy, it pays to be close to lots of other bright people to bounce ideas off. It also pays to be plugged into global networks—and the cities that are most attractive to native youngsters are often also the most attractive to immigrants. Nearly half of Canada’s immigrants live in Toronto, for example, and 40% of America’s live in New York, Los Angeles, Miami, Chicago or San Francisco. Another attraction of big cities is that they house vast numbers of single adults, so they are great places to meet a soulmate.

Both internal and cross-border migration are often temporary. Migrants may stay for a few years and then take their savings, experience and contacts home with them, as Mr Teng did. But governments try to discourage them from moving in the first place. Most obviously, they erect barriers at national borders to keep foreigners out. More surprisingly, they try to deter internal migration, too. China’s hukou system is the most egregious example, but there are many others. When the UN surveyed 185 countries in 2013, it found that 80% of governments had policies to reduce migration from the country to the cities.

Some such policies—such as promoting rural development—are benign. Others are not. India makes it hard for poor people to obtain public services if they move to a new state. Indonesia used to move inhabitants from densely populated Java to more remote islands, stopping only in June 2015.

More subtly, onerous planning rules in almost all countries block the construction of new homes in the cities where young people most want to live. Property owners, who tend to be older, favour these rules because they make their homes more valuable. (Christian Hilber and Wouter Vermeulen estimate that they double the cost of property in Britain, for example.)

Hence the refrain heard from young people everywhere: that housing is unaffordable. Hence, too, the large number who still live reluctantly with their parents. American women aged 18-34 are more likely to live with parents or relatives now than at any point since 1940. “I don’t know anyone my age who lives in central London without [parental] support,” says Peter Fuller, an intern at a bank. “I’m 24. I need a sense of independence. It’s hard to get that when you’re living at home.”