I think that the use of dark humor helps to enhance some of the basic themes that connect to Mary in Dahl's story. Part of the reason for this is that the examples of black humor used are reflective of Mary as a general part of her being even in the most unthinkable of conditions. Consider the way in which she kills her husband. She uses a frozen leg of lamb. There is a black humor element in Mary going to the freezer, presumably getting dinner and then using said dinner to bludgeon her husband to death. The passivity that Mary strives for in her being in the world is reflective of how she kills her husband. Her predictability is enhanced with the trip to the grocery store. She picks up potatoes and peas for her husband and then when confronted with the grocer's question, figures that cheesecake would be good to bring home. In this, the black humor is effective in enhancing the predictable and passive nature of Mary's being. She has killed her husband and she is embodying the condition that worries about potatoes and cheesecake.
One final example of black humor can be used to enhance the theme of justice and injustice in the story. As Mary prepares dinner for the police officers, she listens in on their discussions about the crime and the murder weapon. She overhears one of them suggest that the murder weapon is ‘‘right under our very noses.’’ Indeed, as they eat the lamb that Mary prepares, the officer is right. The black humor here of the officers literally sitting with the murder weapon right under their nose, on their plate, and eventually in their digestive systems enhances the idea that justice might not be served. The murder weapon is being appropriated by the police officers meant to find it, while the murderer is preparing desert. Black humor helps to enhance the theme in this instant as the passive and controlled life of the 1950s domestic realm collides with the world of murder and deception.