Will was a very intelligent, perhaps genius child and yet he ignored the robot often, frequently at his own peril.
He's bright, but a bit too adventurous for his own good. And in practice, despite a few narrow squeaks, he always comes through all right in the end, which probably boosts his self-confidence quite a bit, and inclines him to follow his own instincts rather than listen to advice.
Surely not incredible in a twelve-year-old. It is, after all, a "mixed-up" sort of age where a kid can be still childish in some ways though more grown-up in others. Will's father may perhaps have had this in his mind when in one episode (sorry I forget which one, but it involved planting a bomb) he is undecided whether to praise Will for his courage or spank him for taking such a frightful risk.
And of course if he always listened to advice, the episodes would be a lot less gripping.
There is a science fiction concept that every second gazillions of alternate universes diverge from each other as every possible decision is made in at least one of them.
And to me it makes sense to imagine that almost all the stories or episodes in a long series happen in separate alternate universes and that very few of them are in the same universe as other episodes. Most episodes are the only ones in their universes.
We can imagine that the producers of Lost In Space searched through billions of alternate universes to find the dozens of exciting adventures that happened to various members of the Robinson group that they showed in the 83 episodes of Lost In Space. And so most of those episodes would happen in alternate universe to every other episode.
So we can imagine that in the vast majority of alternate Universes Will Robinson would listen to the robot's warnings and otherwise do the safe and sensible thing every time he had a choice. But out of all the billions of alternate universes there were a relatively few where Will did something foolish and/or ignored the warnings of the Robot once.
And in a small proportion of those ones where Will acted foolishly there were exciting adventures with happy endings (only a minority of exciting adventures have happy endings). And most of the episodes we saw were selected from among the small minority of alternate universes where exciting adventures happened and the much smaller minority of alternate universes where the exciting adventures had happy endings.
If one believes that all the Lost In Space episodes happen one after another in the same alternate universe, then obviously Will Robinson behaves foolishly and recklessly time after time in most of the 83 episodes. And the reason why he does so is probably some character flaw, perhaps related to the one that makes him trust Dr. Zachary Smith time after time even after Smith's lack of thrustworthyness has been demonstrated time after time.
So either Will acts foolishly in only a tiny insignificant fraction of countless alternate universes, or else he acts foolishly in most of the episodes happening in one alternate universe, in which case he has some unknown character flaws that we can only speculate about that cause him to act foolishly.