The song "Misty Moisty Morning" by Steeleye Span is in a major key. My knowledge of music theory is fragmentary so I may have gotten it wrong but I believe it's true. I don't remember which key it is originally, but I like to play it in G. In this key, the song uses all sounds in G major, except the sound C. (So all of these sounds are in D major too but the song ends in a strong G sound, so I think it makes it a G major). All sounds in the song are from G major too, except one: F, which ends the second line of every stanza (stanzas have four lines each).
My question is: why is it OK to use this sound and it still sounds right? I understand that this is possibly an open-ended question, so a more specific one is this: is there a name for such a usage of a sound from outside the scale?
The song is here although the quality is rather bad. The first occurence of this F is about 0:48, when she sings "leather".
I'm very sorry if what I'm saying is difficult to understand. Please point out any mistakes or vague parts of this post so I can try to correct myself.
EDIT: I knew my question would be too vague... I understand that if the musicians were playing something dissonant, it wouldn't sound right. I wanted to ask about the mere melody. Most melodies, at least Western, stick to one scale I think. Then the melody sounds pleasing. I like to play random sounds from one scale on my guitar because it always sounds good to me. When I try to add sounds from outside the scale, it usually sounds wrong. What is it that makes a sound from outside the main scale sound good in a melody?
Here's another example:
The song is in F major, yet about 0:23 the sound B provides a pleasing (at least to me) change.