The Beatles' song "Let It Be" is in the key of C major. (This is not up for debate.)
"Enter Sandman" by Metallica is in the key of E minor. (The parts in F# minor lead strongly back down to E minor.)
Beyonce's "Love On Top" is in C major. (Many modulations up a half-step at the end, but still primarily C major - the ending is clearly a repeated variation of the main part of the song, so C has the mosta convincing claim to being the key of the song.)
"Layla" by Eric Clapton is in D minor, but drops everything down a half-step to C# minor in the verses. (It makes sense to say that D minor is the primary key, since it is only the verses that temporarily shift.)
Frank Sinatra's recording of "Fly Me to the Moon" can be viewed in C major or in its relative key A minor. (There is a continuous blur between the two relative keys.)
"God Only Knows" by the Beach Boys has E major competing with A major to make a weak and fluid tonal center. (Though E is likely the most viable candidate, the song weakens the key by constantly flirting with other keys such as A major and avoiding strong resolutions to the E chords.)
"Bohemian Rhapsody" by Queen begins by tonicizing the key of Bb major and modulates to various other key centers. (It is not feasible to pick a single key to label the entire song with, but since it starts in one clear key, this can be used to communicate the necessary information.)
"Giant Steps" by John Coltrane cycles between the keys of B major, Eb major, and G major. (It is useless to single out any one of the three key centers.)
Schoenberg Piano Concerto Op. 42 is atonal. (Defies any tonal logic, and no key could make a claim to represent this composition.)
The concept of a key should not be applied to "4'33"" by John Cage. (Assigning a key signature to silence is pointless.)
Generally, the most important purpose for giving one single key for a song is to get every musician on the same page as to what to play, and in cases with multiple keys present, as long as one key is given for one agreed-upon moment onin the music, every other part of the music can be playeddeduced with some transposition. The trouble with that often lies in two places: either it is not obvious what the key at a particular moment is, or there is no obvious moment to select as representing the key of the entire piece, or potentially both. Thus, occasionally music may require a longermore detailed description of its varying tonalities in order to communicate unambiguously what to play.