So what?
If rounds are coming from the hospital, then the doctors and nurses in there, who can hear the firing, need to get out.
Counter-battery fire does not look at the target, it just goes to where the rounds came from.
All of the patients were Taliban wounded and the Afghan Army called in the coordinates to hit it.