After you screw something up, you magically and conveniently gain a vast amount of knowledge on what you SHOULD have done to avoid screwing up.
Although it generally occurs after you really messed up, it doesn't necessary always happen after such a negative situation.
Girl- "Hey Dave, I just tested positive on that pregnancy test, you dunce."
Dave- "You know, maybe I kind of, should have used a rubber at that party 2 weeks ago.... " <--(Hindsight)
Girl- "Yeah... that probably would have been a very good idea."