Minecraft wiki entry for Combat, associated text: Wolves are a messy way to combat them because the wolf will attack the mob who last attacked it, so it may alternate from attacking the spider to attacking the skeleton, etc.