Whale Rider

The film's plot follows the story of Paikea Apirana ("Pai")[In the book, her name is Kahu, short for Kahutia Te Rangi], a 12-year-old girl who is the only living child in the line of the tribe's chiefly succession following the death of her twin brother and mother when she was born. By tradition, the leader should be the first-born son a direct patrilineal descendant of Paikea, aka Kahutia Te Rangi in the book, the Whale Rider he who rode on top of a whale from Hawaiki. However, Pai is female and technically cannot inherit the leadership.Pai's koro, Apirana, or Old Paka as his wife Nanny Flowers calls him, the leader of the tribe, is initially angry at losing his grandson and being left with a "worthless" female. While he does later form an affectionate bond with his granddaughter, carrying her to school every day on his bicycle, he also resents her and blames her for many of the troubles facing the tribe. At one point Paikea decides to leave with her father because her grandfather is mistreating her. However she finds that she cannot bear to leave the sea as the whale seems to be calling her back, tells her father to turn the car back and returns home. Pai's father refuses to assume traditional leadership; instead he moves to Germany to pursue a career as an artist. Pai herself is interested in the leadership, learning traditional songs and dances, but is given little encouragement by her grandfather. Pai feels that she can become the leader, although there's no precedent for a woman to do so, and is determined to succeed.Koro decides to form a cultural school for the village boys, hoping to find a new leader. He teaches the boys to use a taiaha (fighting stick). This is traditionally reserved for males. However, Nanny tells Pai that her second son, Pai's uncle, had won a taiaha tournament in his youth while he was still slim, so Pai secretly learns from him. She also secretly follows Koro's lessons. One of the students, Hemi, is also sympathetic towards her, but Koro is enraged when he finds out, particularly when she wins her taiaha fight against Hemi. Koro's relationship with Pai erodes further when none of the boys succeed at the traditional task of recovering the rei puta (whale tooth) that he threw into the ocean this mission would prove one of them worthy of becoming leader.Pai, in an attempt to bridge the rift that has formed, invites Koro to be her guest of honour at a concert of Mori chants that her school is putting on. Unknown to all, she had won an inter-school speech contest with a touching dedication to Koro and the traditions of the village. However, Koro was late, and as he was walking to the school, he notices that numerous right whales are beached near Pai's home. The entire village attempts to coax and drag them back into the water, but all efforts prove unsuccessful; even a tractor doesn't help because the rope breaks. Koro sees it as a sign of his failure and despairs further. He admonishes Pai against touching the largest whale because "she has done enough damage" with her presumption. Also, the largest whale traditionally belongs to the legendary Paikea. But when Koro walks away, she climbs onto the back of the largest whale and coaxes it to re-enter the ocean. The whale leads the entire pod back into the sea; Paikea nearly drowns in the process. When she goes out to sea, Nanny Flowers shows Koro the whale tooth which Pai had previously recovered. When Pai is found and brought to the hospital, Koro declares her the leader and asks her forgiveness. The film ends with the village, including Pai's father, uncle, and grandparents, celebrating her status as leader, as the finished waka is hauled into the sea for its maiden voyage.

Question: Why can Paikea Apirana technically not inherit the leadership?
Answer: she is female