The answer above may be correct, but I do not think that this is really what Sammy is thinking. To me, he is not thinking about what he wants to be in the future or anything like that. When I read this story, I go back to being a teenager and I know what I would have been thinking in Sammy's place -- I would have been thinking that maybe I could impress these girls and get one or more of them interested in me.
I think that teenage boys are (or at least were in my day) way more interested in the slightest possibility of sex than in what their future might hold. Because of that, I think that Sammy is being purely driven by hormones and mental pictures of Queenie, in particular" as his girlfriend.
My only evidence for this (other than my own memories) is this line:
The girls, and who'd blame them, are in a hurry to get out, so I say "I quit" to Lengel quick enough for them to hear, hoping they'll stop and watch me, their unsuspected hero.
Sammy makes his sudden decision to quit for reasons that he does not articulate. Probably, however, his thinking (paragraph 21) is based on fears that he might eventually develop into a carbon copy of Lengel if he does not begin asserting himself on matters of principle. His explanation to himself is summed up in paragraph 31 with his observation that it would be "fatal" not to go through with his gesture. In other words, his sense of identity is on the line and he must maintain his integrity in his own eyes even if the girls know nothing about his action. He realizes that the world will be hard for him "hereafter" because people like Lengel may always be gaining economic or arbitrary power over him, and therefore he may feel future pressure to suppress his integrity.
Sammy from the story "A&P", quits because he is hoping that the women will come to him as a hero. He is hoping that they will be pleased with his actions so much that they will give him sex. He wants to feel like a hero and in his mind he has this imagination that since he practically "saved" them that they will reward him. Sammy is a young man who does have crazed hormones. John Updike wanted to show in this story, how against women he is. Women were not even given a voice until halfway done with story. A man is given a voice in the first page. Just comming from a feminist point of view, Sammy only quit looking to be looked as manly.