A big problem is that scientists are traditionally very secretive. This would increase the possibility of leaks, and there'd need to be some way of assuring that the experiment was conducted correctly. Good idea, though.
I just have experience working in 3 different labs in Germany and I can tell you:
secrecy is the holy grail and just using privat repos (for code not data) on github/sourcefore is forbidden.
But this is perhaps just small sample size and a german habit ;)