I'm just starting to learn music theory, and i worked out the chord progression of the song "Wet Sand" by Red Hot Chili Peppers. It has the chords G, D, Em and Bm as well as some fills that are all based on the G major scale. However, when it comes to the main solo, it starts with a G# and C#. Is there some kind of theory behind it, or shouldn't i care about these things very much. I thought that it would be easier to transcribe songs if i know the key it's in, but now it seems that it might not be the case.
Thank you very much!