The Covid-19 pandemic has crushed the economy, sent joblessness soaring, and killed over a million people worldwide. But there are a few ways in which the pandemic may prompt society to improve, and one is remote work. Though it was initially necessary to keep employees from getting sick, remote work promises to make people more productive and happier while helping the environment and preserving infrastructure.

When the coronavirus struck, those who could do their jobs remotely often did. The number has gradually declined as our understanding of safety measures increased, but it’s still substantial.

And while many people will go back to the office after the pandemic is over, part of the shift will probably be permanent. A recent survey shows a substantial increase in the number of workers who say they won’t go back to the office full time:

There are certainly drawbacks to the remote trend. Those working from home are far more likely to be in higher-income, professional occupations, such as engineers, lawyers, financiers or consultants. Most lower-income jobs can’t be done remotely, such as in food service and brick-and-mortar retail. That’s created inequality in terms of both unemployment and exposure to Covid-19. And when high-income workers become accustomed to staying home and ordering online instead of going out to eat and shop, it’s lower-earning local service workers who bear the brunt of the shift in demand.

The trend has also taken a psychological toll. People who work remotely often end up putting in more hours than when they go into the office. With the boundary between job and home life blurred, there’s no obvious signal that it’s OK to stop working, which can make it hard to relax. As any graduate student or entrepreneur can attest, the nagging anxiety of whether you should be working more can easily lead to burnout.

But there are good reasons to think that these negative effects will be mostly transitory. As countries that have dealt successfully with Covid-19 show, engineers and lawyers will go back to restaurants and shop at stores when the pandemic is over. While a few industries such as movie theaters may suffer permanent decline, home delivery is not a true substitute for most retail experiences.

Psychological stress will probably also ebb as the coronavirus threat eases. People who work remotely will develop strategies to segment their jobs from their personal lives, and budget their time in ways that leave them less anxious. Professors, writers and other people whose jobs have always been semi-remote show that this can be done. And as the chart above shows, most workers will eventually alternate between home and the office.

This kind of part-time remote work promises to bring substantial benefits to society. Flexibility will add to work-life balance: If a working parent needs to stay home to take care of a sick child or supervise home repairs, they’ll be able to do that without sacrificing income or productivity. Vacations will be easier, too. Remote work could even increase productivity, by reducing the number of hours wasted by people trying to look busy for their bosses.

In the long run, especially with smart policies, more flexible work arrangements will be a good thing.

Remote work will also benefit American society economically. Fewer days in the office means less time spent commuting. A recent blog post by the Federal Reserve Bank of St. Louis looked at falling commute times in three suburban counties and calculated that about 1 million to 1.5 million hours were probably saved in each county between April and July. Going forward, the amount saved will be less, but still substantial.

Long commutes are associated with unhappiness, so more days spent working at home will make for an emotionally healthier populace. It will also save workers money and reduce wear and tear on the nation’s crumbling road infrastructure. Reduced greenhouse emissions will be yet another plus.

To maximize the benefits from the shift to remote work, government policy should aim to ease the transition. Since more people will be toiling out of their houses instead of an office building, cities should change zoning codes to facilitate conversion of commercial real estate to residential.

Government can also subsidize service workers to move to new neighborhoods to follow high-income jobs, since that’s where the new demand will be. It can also help retrain people displaced by long-term shifts in demand (such as the decline of movie theaters). And it can gather information from big companies that successfully managed a shift to partial remote work, and share those strategies with small businesses that might otherwise have a tougher time managing the transition.

In the long run, especially with smart policies, more flexible work arrangements will be a good thing. Covid-19 has wreaked terrible damage on society, but in this small way it will end up moving things in a healthier direction.