Minecraft wiki entry for Spawn_chunk, associated text: Hostile mobs more than 128 blocks from a player despawn.
Passive mobs only spawn inside a 240×240 block area around the player.
Passive mobs present in the spawn chunks count toward the mob cap. This often prevents friendly mobs from naturally spawning elsewhere in the world.