John Updike's short story "A & P" is set in a beach town. Yet, Sammy makes certain to note that the beach is five miles from the A & P store, and the store is "in the middle of town." The location of the store and its proximity to the beach helps explain the shock in Sammy's reaction, as well as the shock in customers' reactions, at seeing the girls in the store clad only in bathing suits. As Sammy phrases it, women who go into the store after returning from or heading to the beach "generally put on a shirt or shorts or something before they get out of the car into the street." The girls didn't do that even though it has been five miles since they have been near a beach, which helps portray their boldness and self-confidence, characteristics that apparently contrast with the characteristics of other women in the town.
In addition, the store is near "two banks and the Congregational church," which helps show the store is situated in a very civilized, very reserved area. Yet, the girls are acting in ways that the citizens would consider to be the exact opposite of civilized and reserved, further explaining the shocked reaction the girls incite.
Another aspect of the setting that helps explain Sammy's reaction, especially his decision to quit, is that the town is near Boston. Boston is a very metropolitan area; the type of location that is very sophisticated, yet also the type of area that has seen it all, every strange antic a human being is capable of. The fact that the girls are buying herring snacks also helps characterize their own sophistication. In Sammy's mind, Lengel's choice to argue with the girls, rather than just reprimand them and let the matter drop, thereby embarrassing them, was far from sophisticated and far from metropolitan. In Sammy's opinion, Lengel behaved in a manner that was the exact opposite of the girls' manner and the exact opposite of how those in Boston might react. Therefore, the reference to Boston helps explain Sammy's reaction: In Sammy's mind, Lengel pushed the matter much too far.