The reason I think Sam can start the song in the right key off the bat is because when you sing frequently your body becomes accustomed to resonating with certain notes. I find it relatively easy to start off a song in E, D G or A because I have sung so frequently in those keys the resonance is very familiar to my vocal chords. I often can recognize other notes also simply from familiarity to the resonance. I believe for me, like Mike, it is developed over time from frequent application.