The purpose of Mary's visit to the grocery store and conversation with Sam is to establish a credible alibi for herself. Within the previous hour, Mary's husband told Mary that he was leaving her. Shortly after, Mary clubbed him to death with a frozen leg of lamb.