This isn't entirely true. There are indie games that are open source or have publicly available easily accessible source code.
LD48 requires that you open source games in the jam, so that's 1000s of games with available source code, even if most of them don't live on Github. Quite a few Humble Bundle games are open source as a result of the bundle (http://indiegamebundle.wikia.com/wiki/List_of_Humble_Bundle_...) I can think of other indie games that are open source, Stephen Lavelle's games (http://www.increpare.com/), Game Maker Spelunky, Mari0, Infinite Super Mario Bros. Roguelikes are also usually open source.
Libraries or contributions to frameworks that have come from indie game developers include MojoShader (http://icculus.org/cgi-bin/finger/finger.pl?user=icculus&dat...), MonoGame for Mac OS X, Linux and NaCL, (http://supergiantgames.com/index.php/2012/08/bastions-open-s...), Flashpunk and Flixel.
I also think it's unfair to knock game developers for not open sourcing their games. Last time I checked, many startups open source libraries and helper code, but very few of them open source their product code. The indie game community is also much smaller than the startup community and also less technical on average.