Herobrine does not exist in any version of Minecraft. He originated from a 2010 creepypasta / livestream hoax (white-eyed Steve texture + "removed human" lore).
Facts
Never in vanilla code (Java, Bedrock, Legacy Console, Education, Pi).
Mojang officially denies existence; changelogs joke "Removed Herobrine" since 1.6.6.
Xbox 360 Edition (TU73 final) has no Herobrine code, textures, or spawn logic.
Why the Legend Persists
Mods / resource packs / custom maps add him.
YouTube "sightings" = staged / modded.
Psychology: pareidolia in fog/caves + community storytelling.