If neutral NPCs get damaged by you, either by enviromental effects or for example Pain reflection, they tend to get hostile. It's proabably more a flaw of the system, than a bug. Like if a ricochet jumps from enemies on to neutral targets and makes them hostile too.