I'm not sure about "any" measure, the average startup probably has no surviving code in production.. Even the average in acquired startups, if we count acquihires..
That doesn't exclude anything. Code can exist to pad resumes, feed paranoia, and bolster egos, manipulate people, or simply because someone can't admit their own mistakes. Anything can be a solution to a problem.