A pandemic that makes consumers focus on their health should be good news for US healthcare companies. In reality, the crisis has created unexpected winners and losers in the $4 trillion-a-year industry. While health insurers have reported bumper profits thanks to delayed or foregone care, brick and mortar retail pharmacies have seen their finances squeezed by lockdowns and social distancing orders.

Separate deals announced on Wednesday by drugstore operator Walgreens Boots Alliance and health insurance company UnitedHealth underscored the divide.

Walgreens is selling its pharmaceutical wholesale business to AmerisourceBergen for $6.5bn. The division buys drugs from manufacturers and then distributes them to customers like drugstore chains. This is a steady, if low-margin business. It generated nearly $24bn in revenue for Walgreens last year, or 17 per cent of group total.

Walgreens is getting a decent multiple — 11.5 times trailing earnings. But there is no doubt this is a defensive deal.

Walgreens said the sale would allow it to focus on its core retail pharmacy business, which includes more than 9,000 drugstores across the US and the struggling Boots chain in the UK. But the move will also renew speculation of another take-private bid after talks of a $70bn management buyout came to naught.

Walgreens has reason for wanting to escape the glare of the public market. Owning physical drugstores is not the cash cow it once was. The pandemic has not helped. Fear of catching the virus has prompted more customers to get their medications delivered. This means less foot traffic into stores and less browsing and buying of everyday items such as toothbrushes and make-up. Online competitors, namely Amazon, were already eroding sales. Walgreens shares lost a third of their value over the course of 2020.

Contrast this with UnitedHealth Group. The $329bn insurer is buying Change Healthcare for $7.84bn in cash. It is paying a 41 per cent premium to add Change’s billing and revenue management platform to its portfolio of healthcare technology services. This is a sensible move. Optum, United’s data analytics unit, is fast-growing, with revenue up a fifth year-on-year to $34.9bn during the third quarter. Its selling pitch is helping clients simplify the medical care process and lower the costs involved in America’s notoriously convoluted and inefficient healthcare system. This deal should get a more appreciative response than Walgreens’ transaction.

Lex recommends the FT’s Due Diligence newsletter, a curated briefing on the world of mergers and acquisitions. Click here to sign up.