David is idealistic because he thinks that he can keep Sophie’s condition a secret, and he also thinks that he and the other telepaths can remain hidden in their strict society. In Waknuk, everyone has to be the same. You have to conform to the True Image. It is idealistic for David to think that any of them are going to be able to blend in and get away with it.
When David finds out that Sophie has extra toes, he doesn’t even seem to realize the significance of it.
It was so heavy a promise that I was quite resolved to keep it completely — even from my cousin, Rosalind. Though, underneath, I was puzzled by its evident importance. It seemed a very small toe to cause such a degree of anxiety. But there was often a great deal of grown-up fuss that seemed disproportionate to causes. So I held on to the main point — the need for secrecy. (Ch. 1)
At ten years old, living with a tyrannically religious zealous father, David should know that having extra toes or anything unusual about you is unacceptable in Waknuk. Sophie’s parents are terrified when he finds out and beg him to keep it a secret. He agrees. David just doesn’t get the position they are in.
David’s naiveté has been ongoing. He is telepathic, and he and the other telepathics have been in hiding for years. Even David’s little sister has the ability to read minds. They can only read the minds of each other, so they have been able to hide it.
“I want you to keep it secret. I want you to promise that you will never, never tell anyone else what you have just told me — never. It's very important: later on you'll understand better how important it is. You mustn't do anything that would even let anyone guess about it. Will you promise me that?” (Ch. 4)
Uncle Axel told David not to tell anyone. He was aware of how idealistic and naïve David was, and worried that he would not understand what danger he was in. Eventually, it all comes crashing down on David when Sophie is discovered, and then Petra.