The behaviour is real. A female European mantis sometimes seizes and eats the male during or after copulation, and a decapitated male can continue transferring sperm because the relevant motor circuits sit in the abdominal ganglia rather than the head.
What the early accounts got wrong was frequency. Much of the classic evidence came from pairs placed together in small containers under bright light, with females that had been underfed, conditions that both raise aggression and remove the male's escape route. Observations of undisturbed pairs report cannibalism in a modest fraction of encounters, and experiments manipulating diet show poorly fed females attack far more often than well-fed ones. Males respond with cautious approaches and rapid mounts.
The adaptive question is still argued. There is evidence in some mantis species that nutrients from a consumed male are routed into the eggs, raising the number produced, which would make the male's loss partly a paternal investment rather than pure predation.

