You say it as a negative, but in practice, the old code is the only reliable specification.[1] Written specs are never comprehensive enough. If you rewrite based off of specs, you're bound to have both bugs and missing features.
[1] Well, if the codebase has very comprehensive tests, that's likely better than the old code. But few projects have this.