Complex sentence: In the latter four cases, code which is currently unreachable is there as part of a legacy, i.e. code that was once useful but is no longer used or required.
Split into simpler sentences: In the latter case, code which is currently unreachable is there as part of a legacy. The distinguishing point in that case is that this part of code was once useful but is no longer used or required.