mobs will seem to get "confused" when hit by the player or another mob
I noticed this when i was near villagers and there was zombies nearby. The zombies were targeting the villagers at first, But then when i attacked the zombie it looked down, then targeted me, but when i hit the zombie again it went back to looking at the villagers.