So correct me if I'm wrong: you're saying you can identify the key and the intervals of the notes by listening (& presumably playing it back to yourself on your guitar), but you'd like to figure why it's best to start in a certain position?
If you know the music (either through listening or you have the music in front of you), it becomes a question of how to finger it most efficiently. Let's take a look at the example you came up with. From a quick Google search, Stairway to Heaven appears to be commonly is arranged in A minor & starts off like this (lots of different arrangements use this same opening lick):
So, just looking at these two measures, I see two ways of playing this: the easy way and the hard way (assuming we're not looking for crazy, exotic fingerings on the 12th fret).
The Hard Way
Let's say you start off the first arpeggio in the first position (A on 3rd string, 2nd fret; C on 2nd string, 1st fret; open high E), but then you have to go grab the high A (1st string, 5th fret). And then a B with a G# harmony. The easiest way to do this is with your pinky or ring finger on the high B, and your middle finger on the G# (4th string, 6th fret). Then comes another lower C a beat later, before having to go back up to get the high C on the 8th fret. If you insisted on playing everything you could in the first position, that would be 4 or 5 different times you would move your whole fingering hand in one measure (i.e. a lot of work).
The Easy Way
I would start off with a barre (or half-barre) on the fifth fret (fifth position). Reach down with my ring finger to get the A (4th string, 7th fret like you mentioned in your question) and I can play the whole arpeggio without moving my fingering hand, because the C, E, & high A are all under the barre. The next arpeggio starts with that high B & G#; we can finger that like I described in the last section but the difference is you're already in position. And if you keep the barre down, you already have the rest of the arpeggio fingered. Instead of moving the whole hand around to different positions, this way we only have to move two fingers the entire measure.
So to answer your question, the method is to be lazy (kind of). Think about where the notes can be played to minimize moving your hand. I would suggest start learning where certain notes can be played on the fretboard (for example, I know I can find a high E on the open 1st string, 2nd string 5th fret, or 3rd string 9th fret). Play something through and if it seems your fingering hand is moving all over the place, try to see if you can find the same notes closer together on different strings. This usually works really well with arpeggios with a high note on the first string; instead of trying to jump up the fret board in the middle of a phrase, find a way to utilize the higher frets on the lower strings. Not only will you save yourself work, but the music will sound less like a bunch of individual notes smashed together and more like a cohesive piece. And don't worry if it doesn't come to you right away. It's a skill that takes lots of practice & revision. Even advanced players have to revise their fingerings from time to time.