Earlier quoted context omitted.
Most of the times, they don't. Static typing helps with catching certain types of errors long before the compiled code arrives in production but it's just one tiny factor that contributes to overall software quality. Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing.
> Lack of expressiveness or lack of developer happiness can be much more detrimental to software quality than lack of static typing. Except 5 years later, when the happy developers have gone on to express themselves elsewhere, and left behind them a mess. Now, you can make a mess in any language, but a mess in a dynamic language is considerably harder to refactor. I also dispute the claim that a strong type system is…
There actually are some studies that show that using a static typing system is only a tiny factor when it comes to code quality:
http://wadler.blogspot.co.uk/2011/09/experiment-about-static...
However, I've also read studies that show the opposite, but the lack of rigurosity and the possible confounds that show up for both sides seems to render this as an open question.