Personally I think it's rare that rewriting subpar code is a great idea. Some refactoring is frequently in order, but that's true in general. Even understanding the faults of an existing system, it's a big undertaking to rebuild it and make it better in one go.
There is a certain class of code that is not merely subpar but actually can be easily rewritten with 1/10th the code and will be less buggy as a result. We may be talking about the same thing, but if so I think "subpar" is being too polite for code that will actually benefit from a rewrite.