Modulation (music)
Modulations like the one above are very common, because G is closely related to C (it is the 5th note in a C major scale: the "dominant").  A modulation to the subdominant (4th note of the scale) is also common (e.g. from C major to Fmajor).  Music often modulates to the relative minor (e.g. C major to A minor).