Pfizer Inc.’s proposed $160 billion merger with Allergan plc fizzled dramatically on Wednesday, after months of public anger and regulatory angst over the controversial tax inversion deal.

So why should Pfizer be thanking its lawyers?