Sammy has a moment at the end of the story in which he asserts himself, gains self-esteem and a sense of individuality, but in a complex way.
Sammy is cynical and romantic. He exhibits a kind of double standard in this way. He is obviously infatuated with Queenie, so this is where the romantic, idealized part of his perspective comes in. But he's quite critical of the other customers. He calls them sheep and says "I bet you could set off dynamite in an A & P and the people would by and large keep reaching and checking oatmeal off their lists." To Sammy, they are sheep and Queenie is a subtle rebel. She makes them take notice, albeit momentarily.
Sammy is quick to be more critical of the older customers and quick to come to Queenie's defense. This is because of the obvious crush he has on her but he also has aligned himself with her generation. He is a "young adult" but he still retains the feeling of rebelling against the previous generation. Sammy is in the phase of his life when he still feels that rebellion of adolescence but he must also transition into adult life. This is the complexity of his perspective. When Lengel scolds the girls for the way they're dressed, Sammy takes their side. He rings up their purchase and flatly says, "I quit."
Perhaps Sammy is too dismissive of his older customers and perhaps his infatuation with Queenie has made him act too hastily in quitting his job. Regardless of whether Sammy is right or wrong in his decision, his choice to quit is his statement of his own individuality. He makes this choice knowing it will be hard on his parents and himself. But he does it anyway, out of principle. He is confident enough (has the self-esteem) to make this difficult choice. He is confident enough to live with the consequences, even though he "felt how hard the world was going to be to me hereafter." Sammy gains self-esteem in this moment but is left feeling forlorn as well.