All good characters have a complex back story. But what is it with giving female TV detectives a particularly awful past?
By no means is every female investigator on television shown to be "damaged," but I think there are enough to make up an anecdotal trend. This "damage" is usually crucial in explaining why the character became a detective in the first place and why they are so intent on doing their job. It's not something that crops up in male characters all that often (exceptions include Batman, a superhero; and Angel, a vampire with a soul).
Lisbeth Salander in the Swedish Girl With the Dragon Tattoo books and films is probably the most extreme example; her father violently traumatizes her mother, she is trapped in an institution to keep her quiet, she survives sexual assault, abuse and violence. To add to her vulnerability, she's repeatedly described in the books as looking more like a teenager than an adult woman.
In Fringe, we find out Agent Olivia Dunham has been cruelly experimented on as a child, changing her personality and giving her extraordinary skills. This sets her up to join the Fringe Division, dedicated to investigating supernatural events, where she is put through a seemingly endless onslaught of further experimentation, body swapping, and dimension swapping— often in her underwear—immersed in an isolation tank.
In Bones, Dr Temperance Brennan is still dealing with the fallout of her parents' disappearance when she was a teenager, and it's strongly implied that this is behind her difficulties with social interactions and expressing emotions.
The trope crops up even in the lighthearted Castle, an updated version of Moonlighting in which Rick Castle, the author of a series of bestselling crime novels, partners with NYPD detective Kate Beckett. Beckett joined the police to investigate her mother's murder, only for the case to become a problematic obsession that takes over her life.
This trend is particularly noticeable for characters who are young, white, and conventionally attractive. Even though it's often used to explain that the characters have trouble making emotional connections, particularly in relationships with men, it's also often the crack in the character's "Strong Woman" armor that invites in the almost inevitable male love interest.
Good writers know that it's essential to put their protagonists through the mill, to create a good story and compelling character. But for most male detective characters, and increasingly for female characters, the day-to-day exposure to violence and murder produces sufficient angst and personal problems.
Let's look at an equal-opportunity trope, of detectives who are somehow "messed up by the job." Good examples of the detective genre go to lengths to show the impacts of investigating murder on the characters, whether it hardens them, or screws them up emotionally, or is simply so all-encompassing it's difficult to carve our a personal life outside of the job.
You've got Sarah Lund (Sarah Linden in the US version) in The Killing. As the first series starts, Lund is preparing to leave the country with her teenage son and get married, ending her career in the Danish homicide squad. A murder case lands on her desk in her last days on the force, and we see her struggle between making time for her son, preparing to leave, and being drawn deeper into the case.
The self-destructive detective who wrecks relationships and acquires a drinking problem is so common as to be an archetype for male characters and increasingly the norm for female characters. The Wire gives us both Jim McNulty and Kima Greggs struggling with similar issues, particularly from season two when Greggs is recovering from a gun shot wound, and comes under pressure from her girlfriend to transfer permanently to a desk job to avoid getting injured again.
The "damaged" female detective is in another category from Lund and Greggs, because she's not just an interestingly flawed character dealing with the repercussions of her workplace—the implication is that she herself is damaged. I'm not saying that no female detectives should have a difficult past, it's just that as we have such a paucity still of fully rounded female characters, we need to remain cautious when these tropes begin to emerge.
Personally I think we see these characters so regularly because of a lingering discomfort with showing these particular women as unphased by the morgue. Something extra is required by way of explanation; I imagine the writers musing to themselves as they add a few traumas into their detective's past, some added vulnerability so we the audience can still think of the character as in need of a good rescuing.