“ Things You Should Never Do: They decided to rewrite the code from scratch.” This is a great general rule.
The rule is situation dependant and some people can break it and succeed: the parent comment was very clearly one of those situations.
The actual risk is that the majority of us think we can break the rule, when it turns out we can’t. But a minority of people/situations can successfully do a complete rewrite, success defined as where the gains abundantly outweigh the pains.