The keys are legal so far as I know.
The games GTR2 and GTL were on the DVD in the magazin "Computer-Bild Spiele". And they offered you to get a key to play also online.
I don't know if you need to buy the magazine though to get the key.
Never saw or heard GTR2 or GTL are on Steam though. Think the games are also not really supported by Simbin anymore.
For example the official lobby for GTL is down and so on (you still are able to play online with the altbierbude lobby).