I would say that the main problem in The Tale of Despereaux is the hope for things that we cannot have. The root of Despereaux's name is the Latin verb sperare, which means "to hope." Sometimes, we hope and long for things that simply cannot come to pass.
Mouse Despereaux loves a human princess. This hope leads him to enter a world whose rules forbid him entrance. Mice are supposed to eat paper, not read it; and what he reads transforms him from a hopeless into a hopeful creature. Still, mice must avoid humans, not make friends with them; and because Despereaux has entered a world forbidden to him, his fellow mice banish him from the world of mice to the world of rats, from the realm of light to the realm of darkness.
In most "fairy tales," the person who rescues the princess gets to marry the princess. In this tale, however, Despereaux saves the princess, but still cannot crossover into the human realm to marry the princess: ‘a mouse and a princess cannot marry…But…they can be friends’ (p. 267).
So, as The Tale of Despereaux closes, Despereaux and the princess are ‘friends’, they have ‘many adventures’ (p. 267), and the hero-mouse receives the ‘place of honor, right next to the princess’ (p. 268). But still, Despereaux and Princess Pea are ‘just friends’ (a phrase that no one who hopes to have a more-than-friendly relationship really wants to hear). Still, friendship is better than a life in darkness and shadows and sometimes friendship is the best for which we can hope.