"A & P," a short story by John Updike, was first published in the New Yorker in 1961. In this period, the New Yorker was aimed toward a well educated, affluent audience in the New York area, many of whom owned or rented summer homes in neighboring beach communities.
The story does not mention the specific name of the town in which it is set, but given the references to the nature of the small town with a Congregationalist Church located "north of Boston,"one can imagine the setting as one of many resort areas near either Cape Cod or Maine, where there is a strong distinction between the locals and the summer people.
More specifically, the scene takes place inside an A&P, a chain supermarket frequented mainly by locals, whom the narrator describes in rather unflattering terms. The general clientele of the A&P is conservative and working class, and the locals who frequent it resent to a certain degree the wealth and perceived bohemianism of the tourists.
Sammy is attracted not only sexually to the three girls, but also to the degree of freedom and glamour that he associates with life beyond his small town. Even though his family needs the income from his job, more important to Sammy at the moment is the commitment to follow through on his grand gesture of quitting in response to the manager's bad treatment of the girls (a gesture the girls don't even notice). The gesture in a sense repudiates the setting of the novel, rejecting the world of the small town A&P and reaching out to the wider world represented by the three girls.