Another way to look at it is that Ctrl+G takes the code (ASCII) of G, i.e., 71 (binary 1000111) and toggles its 7th least significant bit to get 7 (binary 111) and indeed 7 is the code of the BEL character.
This explanation is over-simplified though. In practice, different systems have used different techniques to derive control codes from key chords. I have a more detailed article about this at https://susam.net/blog/control-escape-meta-tricks.html if anyone is interested to read it.
Control-a inputs byte value 1, control-b 2 and so on.
BEL is mapped to value 7 in ascii, thus C-g.
Note control-space usually does input a NUL (0) in most terminals.