Reading the first few chapters to Snowy last night, he asked anxiously, " Charlie does get a Golden Ticket, doesn't he ? " He knows that Charlie does indeed get a Golden Ticket, he knows there's no story without it, he knows it's guaranteed, he's (ahem - slight touch of mother guilt) seen the movie before reading the book. Still, he needs to ask.
It's not really all that sugar that makes children love this book so much. It's a neat piece of plotting that does it. Roald Dahl causes us to care for Charlie, to invest our hopes in him, to identify deeply with him before he ever grants him his unlikely, unplanned bit of luck.
It's the old three chances thing. First Charlie opens his birthday chocolate bar - Wonka's Whipple-Scrumptious FudgeMallow Delight - hoping, in a hopeless way, to see a glint of a Golden Ticket inside, and - thud - is disappointed. Next, his hopes are raised and dashed with a Wonka's Nutty Crunch Surprise, bought with Grandpa Joe's last silver sixpence.
And at this point in the book, we are Charlie, because we know (even as children) that life does not, much of the time, go our way, despite our wishing it. At the back of our wardrobe is a panel of wood. Dahl acknowledges this to the reader before he offers Charlie a third, random, lucky try. And because he has told us the truth first, we are willing to walk with him through Wonka's fantastical factory gates.