In "A Perfect Day for Bananafish," sex is one of the material pursuits that poses a threat to the well-being of the soul. In the Zen spirit of this work, physical pleasures have no real value and only distract us from pursuing that which really matters. Most of the story's commentary on sex lies between the lines, or can be inferred from reading some of Salinger's other works on the same characters.
Seymour kills himself out of shame for his sexual desire for Sybil.