To be fair, a rewrite from scratch can be justified in many situations, e.g. out of support stack that is hard to hire for or a change of direction where a lot of bespoke code was written and now a one size fits all is used, thus leaving a lot of redundant and interlinked code.
Rarely are those potential reasons actually weighted up against the full cost of the rewrite