Spoiler Alert: At the end of Charlie and the Chocolate Factory, Charlie Bucket is the last child remaining after the others succumb to their flaws (greed, gluttony, gum-chewing, TV obsession). Willy Wonka reveals the true prize: the entire chocolate factory.
Charlie, his parents, and both sets of grandparents move into the factory. Charlie becomes Wonka's heir because his kindness, honesty, humility, and respect contrast sharply with the entitled, poorly behaved children from wealthy families. The book ends with the Great Glass Elevator crashing through the roof of Charlie's shack—their new life begins.