To elaborate on what nocipher said: The problem is not that people are getting their names on projects to which they didn't contribute much[1]. The problem is that hiring committees only care about new scientific works you are producing and not about other ways to contribute to science such as fixing typos, pedagogy, etc. If you want to incentivize such work, you either need to change the criteria upon which universities hire (unlikely) or give supplementary rewards such as cash prizes (possible).
[1] Yes, there are times when it is hard to tell who contributed what to a scientific work. And sometimes people get too much/little credit. But this isn't a massive issue, nor is it something that can be fixed by adopting an OSS culture. Software is often much more modular than science is, so it is often possible to put individual names on commits. But at those times when software is more like science--such as when several smart people are sitting around designing over-arching ideas/structure/strategy for a large project--then software faces a similar difficulty in teasing out individual contribution.
[1] Yes, there are times when it is hard to tell who contributed what to a scientific work. And sometimes people get too much/little credit. But this isn't a massive issue, nor is it something that can be fixed by adopting an OSS culture. Software is often much more modular than science is, so it is often possible to put individual names on commits. But at those times when software is more like science--such as when several smart people are sitting around designing over-arching ideas/structure/strategy for a large project--then software faces a similar difficulty in teasing out individual contribution.