And that is exactly what is wrong with TDD - the sheer dogma involved in a insane statement like that. Throw out all the code - tests weren't written first!
It doesn't seem to matter much that the end result will be the same if you write up some tests for that code, or if you throw the code out, write tests, then just write the same code again. If the tests didn't come first, it's not TDD, and now we can't follow some holy procedure.
Pure madness and everything that is wrong with TDD is summed up in that simple statement: "In TDD you would throw it away and redo it".
In any development, you probably want to throw away your exploratory prototyping - that's not TDD specific. I've seen/heard "write it; throw it away; rewrite it" attributed to Knuth on several occasions, but I'm not finding the original source.
It's ok to be untested for discovery. Even in TDD.
In pure TDD you would be supposed to throw it away afterwards and redo it clean (with learnings) based on test-first.