Although I agree with the previous answer that the internal conflict is significant in "A & P," I disagree with the characterization of Updike's portrayal of Sammy. Yes, as the story concludes, Sammy does think about "how hard the world was going to be to [him] hereafter," but is that necessarily a bad thing? While on the one hand, Sammy's decision to quit could be perceived as an impulsive and illogical decision, it could also represent Sammy's break from conformity and a realization that standing up for what one believes and going against societal norms is difficult. Right now he's standing up for girls who come into a grocery store in bathing suits (in 1961 when everyday dress was nowhere near as casual as it is today), and he sees himself as the girls' "unsuspected hero." But this small step could mean that he was always stand up for himself in the future and will no longer see the world as quite so black and white.
Much of the beauty in this story lies in the way it beckons us to think about what the future might hold for nineteen-year-old Sammy. Walter Wells, in his critical essay, “John Updike’s ‘A & P’: A Return Visit to Araby" (available on e-notes) calls Sammy's epiphany "ambiguous." Yes, Sammy does look forward to an uncertain future, and Wells also reminds us that Sammy's action was spurred by his libido (would he have been as chilvalrous if one of the girls other than Queenie was being reprimanded?), but it is nonetheless a decision that he thinks about and stands firm: "But it seems to me that once you begin a gesture it's fatal not to follow through with it."
Just maybe that "hard" life Sammy thinks about with the lurching stomach might be one that is worth the challenge. He has stood up for a principle, even if a slightly dubious one at this time.