I think you greatly overestimate how well software is documented. Just one example: When the Y2K problem was discussed in the late 90s, one of the big problems was that almost nobody understood the decades old code base. They hired experts, of course, to make sure there were no difficulties when they switched to the year 2000. They made such hair-raising discoveries in some code trees that a lot of the variables had completely useless names, like "Mickey Mouse".