If you wait until the employee has given their notice to begin their knowledge transfer, the company has completely lost the plot.
Not only are you asking to compress years of learning into a couple of weeks or months in the best case that they remember everything and want to turn over that knowledge, worst case is sometimes the person is just not available or has forgotten important chunks. And that's not even mentioning layoffs and firings.
Companies don't pay attention to knowledge transfer for the same reason they don't pay attention to technical debt and scope creep - no incentives to do so for the managers who would have to dedicate engineer time to it.