Financial markets don't always behave logically.
My favourite bizarre-markets story is when someone pointed out that had you bought 1000 Euros worth of Commerzbank shares before the GFC, you'd have recovered a greater percentage of your investment if you had instead spent the 1000 Euros on beer (in Germany) and then claimed the deposits back on the bottles.
Actually, this particular outcome isn't illogical at all - makes sense for pharmaceutical chains to be scared of their online competitors. But it is ironic, because reportedly Walgreens was dragging their feet on a $700million acquisition deal and now by not buying PillPack, it's cost them far more (in virtual money, anyway) than if they had done so.