When you throw out your code you're throwing out all that knowledge on the assumption that you can build it all back with improvements.
Evolving an application from a known good state to a known better state is usually the best approach unless your codebase is small or your app has no traction.
Rewriting your app from the ground up is like getting divorced and dating a new girlfriend. The first few months are a lot of fun until you figure out how much you lost.