We had to destroy _____ in order to save it (idea)

The basic idea of saving something through its own destruction is that it's been set upon a course that leads to its own demise, and swerving it from its course is more work than simply rebuilding it. Usually, at some point during (or possibly even after) the reconstruction, safeguards are put in to prevent the same path being taken again.