Salmon come back to the stream where they were 'born' because they 'know' it is a good place to spawn; they won't waste time looking for a stream with good habitat and other salmon.
Scientists believe that salmon navigate by using the earth’s magnetic field like a compass. When they find the river they came from, they start using smell to find their way back to their home stream. They build their 'smell memory-bank' when they start migrating to the ocean as young fish.
If a salmon can’t find its stream, some continue to search for the right stream until they use up all their energy and die, but most simply try to find other salmon with which to spawn.
Learn more: Western Fisheries Research Center - Questions and Answers about Salmon