At the beginning of chapter twelve, Ponyboy discusses the hearing, "which wasn't anything like [he] thought it would be" (167). Before the hearing, Ponyboy really worried about what the judge would have to say about his involvement in Bob's death and how that might affect him and his brothers getting to stay at home together. Ponyboy mentions that his doctor attended the hearing as well and "had a long talk with the judge before the hearing" (167).
Based on this piece of information as well as the kind of questioning by the judge during the hearing, the reader can infer that the doctor recommended that the judge not bring up Johnny or the night of Bob's murder with Ponyboy. The doctor obviously convinced the judge that Ponyboy's mental health was more than a little delicate concerning that traumatic night. Ponyboy at this point has very mixed up feelings about what happened and mistakenly believes that he killed Bob, so clearly he is currently not a reliable source of information. The judge never questioned Ponyboy about the events directly, although Cherry and the other Soc boys were questioned about what happened at the park.
Ponyboy did not expect the hearing to turn out as it did. Firstly, before the hearing, the doctor has a lengthy discussion with the judge. Secondly, while the Socs are questioned with regards to the day of Bob’s death, he is not asked about it, and the judge avoids the topic. The events suggest that the doctor is aware of Ponyboy’s situation. The doctor probably figured out that Ponyboy had lost both parents in a tragic accident. In addition, Bob’s death and the subsequent death of his close friend Johnny and Dally all serve as traumatic experiences for the young boy. In order to make the best decision in the situation, the doctor is compelled to divulge the details of Ponyboy’s situation to ensure the hearing does not cause any further damage. Thus, Ponyboy is not aware that the judge is privy to information about the prevailing circumstances.
Man, I was scared almost stiff by the time he did. And you know what? They didn't ask me a thing about Bob's getting killed. All the judge did was ask me if I liked living with Darry, if I liked school, what kind of grades I made, and stuff like that. I couldn't figure it out then, but later I found out what the doctor had been talking to the judge about.