Beatrice Prior is the protagonist, the whole story is told through her eyes. She starts out as this incredibly self-sacrificing, quiet girl from Abnegation, the faction dedicated to selflessness. Her internal monologue is full of guilt over every tiny desire. The test says she's Divergent, which means her mind doesn't fit neatly into one faction box, and that's basically a death sentence in their world.
Her role is to be the catalyst for everything falling apart, but in a way that feels necessary. She chooses Dauntless, becomes Tris, and through her training and survival, she uncovers the conspiracy to eliminate Divergents and control the population. Without her specific blend of Abnegation compassion, Dauntless bravery, Erudite curiosity, Amity honesty, and Candor bluntness, the plot wouldn't move. She's not just a chosen one; her mixed nature is the literal key to resisting the system. The ending with her sacrifice to save everyone? Totally in character, that final Abnegation instinct overriding everything else.