That's probably the right attitude to take in hiring. Bad code is difficult and expensive to discover and fix and a bad hire is difficult and expensive to let go.
With proper code review, I don't think bad code is difficult to discover. I also don't think dismissal is very expensive for large corps. For smaller companies or start-ups, the game is entirely different.