What Updike is comparing in this story is the reality of adults, represented in the presence of Lengel and, the shoppers vs. the morals or values of the teenagers, represented by the girls and Sammy.
The young people in this story are impulsive, reckless and rule breakers. The girls disregard the rules about wearing clothes in the store by walking in wearing only bathing suits. Sammy violates common sense by casting off the job that he needs to show solidarity with the girls who were wrong.
"An important theme in "A & P" is that of choices and consequences. All of the main characters in the story must make a choice and endure the consequences of that choice. The consequences of these choices are not always apparent to the characters. Sammy, the cashier, makes the most obvious and most painful choice, and on some level he is aware of the consequences."
So all Sammy did was express his immaturity and lack of understanding of what real life is actually about by trying to impress the girls with his "I quit," which hurt only him. The girls did not even notice him.
"At the end of the story, he quits his job in an effort to be a hero to the girls and as a way of rebelling against a strict society. In a sudden moment of insight—an epiphany—he realizes "how hard the world was going to be to me hereafter'' if he refuses to follow acceptable paths."
In "A &P", some of Updike's points are dated, but the concept between the conflicting values of the teens and adults are not. Sammy, the first person narrator, definitely sees the A & P job for what it is- a job. This contrasts greatly with the social mores of the early 1960's middle class America. A job was to be treatly respectfully and as if your very life depended on it. Respect and decency were to be reflected in one's attire as well. (Notice that Sammy wears a bow tie.) Then we have the girls from the beach who have the audacity (by the standards of the adults) to come into a grocery store in bathing suits. Mr. Lengel tells them that they are not decent. This greatly offends the girls.
Standing up for the young ladies whose bodies he admires and perhaps standing up for his generation, Sammy quits his job in protest- an act that Mr. Lengel is sure that will hurt Sammy and his parents for years to come.