“A&P” is set inside of an A&P grocery store in a small town north of Boston in the early 1960s. The narrator Sammy—a clerk at the store—describes the setting in the following way:
[O]ur town is five miles from a beach, with a big summer colony out on the Point, but we're right in the middle of town, and the women generally put on a shirt or shorts or something before they get out of the car into the street.
Here Sammy establishes that the story is set in a town “five miles from a beach” with a sizable summer colony. This information about the setting explains why a trio of teenage girls would be walking into an A&P in only their bathing suits in the middle of the day. Importantly, Sammy notes that most women “generally put on a shirt or shorts” before coming into the store, making it clear to readers that nearly-naked customers is not the norm in this setting. This helps readers understand why Lengel, the store manager, reprimands the girls and tells them to cover themselves up in the future.
Another important aspect of the setting is the fact that Sammy and his coworkers are all working-class, while the girls in the bathing suits are upper-class. This is apparent given that the young women are not working during the day and are in their bathing suits, implying that they are on vacation. That the only item they buy at the A&P is a can of herring requested by one of their mothers implies that they come from high society families who throw parties with fancy snacks such as herring.
Because of their class position, the girls can get away with not conforming to social norms (as seen in their decision to enter the store in only their bathing suits), while Sammy, a working-class clerk, cannot. This becomes apparent when, at the end of the story, he impulsively quits his job in a symbolic act of support for the girls (after Lengel reprimands them) and immediately regrets it, realizing that life is going to get much harder for him after this.