Because the person/people making it also has to eat??? Have you ever coded something simple? If so, have you ever tried yourself at a game? It's not even just code, there's also sprites and animations, writing and audio (though most of the audio is probably free and/or licensed)