Israel said it raided the hospital because Hamas fighters had regrouped inside and were directing attacks from the compound.