I imagine the same problem is why so many large orgs inevitably turn into hyperstructures of insane management layer cake.. coordination overhead will eventually send everyone begging for the ability to shed work or delegate
Then you get to the critical component where you fire the lead architect/programmer and then it keeps working fine for few weeks, but you find more bugs and you need to upgrade/fix it. Only to find out the documentation if they exist don't help at all and the first 2 tries builds fine so you put it in production only to see everything destroyed. And after 1 year of back and forth you hire 10 other developer to maintain this thing and then 50 others to write a new one.
This is especially bad for software that are written under tight deadline - no matter how much document you write about it. And sadly, there's more software that are written like that than otherwise.
When the newcomer can't get anything out of that doc, if it exist, he/she just need to ask the creator, who will explain very nicely how everything is done, and that newcomer become a code guru in that codebase, and the cycle continues.
Until you layoff 50% of the team and now suddenly nobody knows how 50% of the stuff work.
Ironically, the worse they are (think 5000 lines of Perl with two functions) then the less viable it is to replace them.
Critical knowledge is with the developers unless:
1. The system is stable and feature-complete.
2. You've employed about 10 FTEs documenting every aspect of the thing.
If those two criteria aren't met, they system becomes tech debt, a larger risk, and will likely decay until replaced.