I think it works like this:

You do not get a GoG code if you bought the Steam version, and if you bought the GoG version you do not get a Steam key. If you bought the Larian Vault version you get a DRM free version and a Steam Key, but not a GoG key (because the Larian Vault is already a digital backup). If you bought the physical boxed copy, you get both a GoG key to back it up and a Steam key to activate it (hopefully you won't need to install the entire thing from Steam after installing from the disc.)