There are several reasons why the reader ends up rooting for the wife in the story after she murders her husband. The most obvious way to argue in favor of the wife is to look at the story from a feminist perspective.
At the beginning of the story, the wife has one purpose: make her police officer husband happy. But when he comes home and tells her some bad news—presumably he's found someone else and leaving her—she smashes his head in killing him.
While feminism doesn't promote the murder of men, it does ask women to empower themselves and that's just what she does after killing her husband. She takes action by going to the butcher and giving herself an alibi before returning home to find her husband dead. Then she entertains his coworkers to deflect even more of the blame.
As a result, Mary becomes a woman of action after beginning the story as a woman of reaction.