I'm reading Homicide by David Simon right now (yes, Simon also created a tv show by the same name). The banter of the homicide detectives is a clear example of this, too. It's just one way we (by which I mean humans) cope when faced with constant, high stress situations.