Mainly, I just wish I'd never encountered the website Serial Killers Ink, which showcases terrible artworks by the perpetrators of some truly terrible crimes. I don't like to think about the kind of person who'd pay, say, $175 for a portrait of Jennifer Love Hewitt by Elmer Wayne Henley, who is serving six life sentences for mass murders in Houston in the 70s, or $60 for a cartoon panda by a man with the soubriquet of "the internet's first serial killer". It's all very depressing. But I can't deny it: I kept clicking. The flicker of fascination was there.

That flicker – the morbid curiosity that keeps the "murderabilia" industry in business – is what preoccupies Eric Wilson, whose new book, Everyone Loves A Good Train Wreck, tries to explain "why we can't look away". And he does mean everyone. Even if you're appalled by Serial Killers Ink, you almost certainly feel morbid curiosity in other contexts: to Wilson, the culture's fascination with murderers has something in common with the compelling awfulness of a Mel Gibson meltdown, or footage of natural disasters. And, of course, with car crashes: the urge to rubberneck, one study found, may account for 16% of all traffic accidents. A few years back, the UK Highways Agency tested giant "incident screens" to be placed around accident sites, purely to combat the gawking.

Philosophers and psychoanalysts have long debated the lure of the morbid – but the current dominant explanation, from evolutionary psychology, is rather deflating, lacking any reference to Freudian "death drives" or the like. We're compelled by horrible things, this argument goes, because it pays to scrutinise dangers that could threaten one's survival. Such tendencies evolved before mass media, of course – so these days, we see celebrity self-destruction and far-off tsunamis, and they grip us as hazards that might befall us, too.

But Wilson's conversations with psychologists lead him to another, more uplifting conclusion: that "our attraction to the macabre is, on some level, a desire to experience someone else's suffering." We yearn to empathise – a yearning that is, incidentally, perfectly compatible with the evolutionary argument, since empathy helps us forge close bonds, which are essential for survival. Striving to feel what it might be like to be caught in the tsunami, or the pile-up, may be fundamentally healthy. Perhaps even "the itch to touch a corpse," Wilson writes, recalling his behaviour at his grandmother's open-coffin funeral, "is normal [and] noble."

Recently, researchers at Ohio State University investigated another psychological eccentricity, not unrelated to morbid curiosity: the enjoyment we derive from sad films. On the face of it, this makes little sense. But their work – which involved having 361 people watch Atonement, interrupting them at several points to administer questionnaires – revealed that the film triggered thoughts about the viewers' own relationships. It stimulated empathy, "reinforcing pro-social values". Gratitude for good relationships was part of it, but more generally it just felt stirring to focus on what mattered. We crave meaning and connection, it seems, far more than cheeriness. Neither tearjerkers nor morbid sights offer the latter – but they do offer the former. Ultimately, the lure of death may be all about feeling truly alive.

• oliver.burkeman@theguardian.com

Follow Oliver on Twitter