Although she does not shop for food at Sam's, what is the real reason Mrs. Maloney goes to Sam's store?
Right after she kills her husband, Mary's mind becomes clear. She quickly considers the ramifications of being, caught and imprisoned. She decides not to take the chance of being caught, especially since she is pregnant. She fixes her makeup and then starts practicing how she will converse with Sam when she goes to the store. She wants to sound natural:
She tried again. "Hello, Sam" she said brightly, aloud. The voice sounded peculiar, too. "I want some potatoes, Sam. Yes, and perhaps a can of beans." That was better. Both the smile and the voice sounded better now. She practiced them several times more.
She has already begun to formulate her strategy. Going to Sam's store will give her an alibi. If the detectives ask where she was when her husband was killed, she will have an alibi and a witness (Sam) to say she was out and came home to find Patrick dead. She goes to the store and has a normal conversation with Sam. She does buy potatoes and cake, but the real reason she goes is to have an alibi and a witness. When she gets home, she calls the police and tells them she went out shopping and came home to find Patrick on the floor.