Holes is such a superb novel because it plays with sophisticated topics, such as the role of destiny in a person's life. One of the main themes in the text is the inevitability of destiny. Stanley Yelnats, remember, comes from a cursed family. Nobody in their entire history ever seems to succeed. This is supposedly the result of a gypsy curse, as a consequence for Stanley's ancestor who did not fulfill a promise to Madame Zeroni. It plagues the family for generations, until Stanley finally fulfills the conditions of the promise, by carrying Zero—a long-lost descendant of the gypsy Madame Zeroni—up a hill. In so doing, Stanley claims his destiny, and at the same time changes it. The curse is broken, his family can claim the success they always should have earned, and Stanley is free.
In the case of this story, destiny is one key force that drives the plot. We understand that Stanley and Zero are caught up in it, unfairly yet inevitably. They were destined to meet - or if not them, then some pair of individuals from their respective families - in order to correct an injustice of the past. This idea, that one cannot escape their fate, and that consequences can follow a family for generations, is a compelling one. It is an essential element of Holes.