Carl Zimmer explores this question in this NYTimes piece. There's also an accompanying picture set with some seriously pornographic and violent content! And, check out this profile of Catherine Chalmers, the artist whose photographs are in that picture set.
The opening paragraphs set up the question that's explored in the rest of the article.
Across the eastern United States, a gruesome ritual is in full swing. The praying mantis and its relative, the Chinese mantis, are in their courtship season. A male mantis approaches a female, flapping his wings and swaying his abdomen. Leaping on her back, he begins to mate. And quite often, she tears off his head.
The female mantis devours the head of the still-mating male and then moves on to the rest of his body. “If you put a pair together and come back later, you’ll just find the wings of the male and no other evidence he was ever there,” said William Brown, an evolutionary biologist at the State University of New York in Fredonia.
Sexual cannibalism has fascinated biologists ever since Darwin. It is not limited to mantises, but is also found in other invertebrates, including spiders, midges and perhaps horned nudibranchs.
Biologists have debated how this behavior has evolved in these species.
Zimmer has a background story on the politics behind the evolutionary explanations. Richard Dawkins and Stephen Jay Gould figure quite prominently in that fascinating story.
* * *
I-Like-’Em-Headless-in-Lisbon is a praying mantis who asks Dr Tatiana if she also enjoys the thrilling mid-sex spasms of a partner who has just been decapitated; and we are introduced to a female midge who plunges her proboscis into her mates’ heads and turns their innards to a soup “which she slurps up, drinking until she’s sucked him dry…only his manhood, which breaks off inside her, betrays the fact that this was no ordinary meal.” There are several kinds of spiders, we learn further, “where there can be no doubting the females’ intention to take head, not give it.”