This is likely the cause of his emotional distress and his further emotional detachment from people. Along with that, Holden not wanting to grow up is shown very clearly throughout the story. It is presented with him constantly finding comfort in the innocence of his childhood and the complete lack of knowledge/understanding when it comes to adult things.
The reasons that the author (J. D. Salinger) most likely decided to write this novel are to show what it is like to be depressed in a more natural way. His reasons for choosing these specific themes are probably to show the two main things that young people suffering through depression experience. It is likely that these people feel alienated when it comes to society and the people around them. This is something that Salinger wanted to portray when writing his novel, so people could understand more clearly what depressed people are going