At the very end of the book, Peter has just recovered from one of the worst things to ever happen in his young life—the death of his pet turtle, Dribble, at the hands (or mouth) of his brother. He feels alone and resentful because everyone seems to care more about Fudge, who's in the hospital after swallowing the aforementioned Dribble. But that's when Peter's parents surprise him:
I looked up. Could I be hearing right? Did they really remember about me and Dribble? I put my hand inside the box. I felt something warm and soft and furry. I knew it was a dog, but I pretended to be surprised when he jumped up on my lap and licked me. (10.113)
The gift helps alleviate Peter's feelings about being forgotten by his parents, because it's clear that they do see what he's gone through and they want to make things up to him. He's not a fourth-grade nothing after all; he's a good kid who's responsible enough to take care of a puppy. The ending shows kids that while it's easy to feel neglected and misunderstood by your parents, most of the time they've got your back.