When an infected (or a group of them) is following a player, and another player is standing in a close area to the event, some of the infected (or all sometimes) change their target and attack the second player, leaving the 1st one run away.
This occurs even if the second player is in a place where infected aren't supposed to see him (watching from a roof or from a window for example).
Sometimes when the second player is behind the scene and the first player runs like 20m in front with 2-3 infected behind him, one of the infected turns around and start chasing the second player who was just looking at the scene, or walking.
Sometimes they just plainly ignore the second player even if he's running around the scene or even attacking the infected.