Gloria is totally uninteresting for an 8-year-old kid, which is why she's here. We don't mean that we don't like her—we actually totally remember being like her: young and disappointed by our parents. (Ah, last week.) We identify with Gloria because she seems like such a typical kid. For instance, she loves playing games and is willing to manipulate people into getting her way—like when she threatens not to tell Robbie a story unless he lets her ride on his shoulders. What kid doesn't do that sometime? So, Gloria is useful here because she's unsurprising—because many readers probably could identify with her (or at least recognize her). So, since we recognize or identify with her, we probably feel bad for her when she loses Robbie; and that's the motivation for the entire story.
All that said, we want to point out one more thing: she's the protagonist of this story, we think, not just because she loves Robbie and has the most to lose. Rather, she's the protagonist here because she's very serious and never gives up about getting Robbie back. Of course, she's a kid, so she can't really do much, but she does what she can. She's a little hero.