It may make sense to have such code in the shipped product, so that a developer can attach a debugger to a client's running instance.
But unreachable code may also be part of a complex library, module or routine where it is useful to others or under conditions which are not met in a particular scenario.
Apple's SSL/TLS from February 2014 contained a major security flaw known formally as CVE-2014-1266 and informally as the "goto fail bug".
As a consequence, err will hold the status of the SHA1 update operation, and signature verification will never fail.
Code may become unreachable as a consequence of transformations performed by an optimizing compiler (e.g., common subexpression elimination).