Encountering the shark provides Mafatu with another opportunity to prove his manhood, to show his people that his reputation for cowardice and timidity is ill-deserved. But his initial motivation for killing the vicious sea beast is anger. The hammerhead shark attacks the fish trap that Mafatu has taken an absolute age to construct. As one can imagine, he's pretty miffed when the shark undoes all his painstaking handiwork in the blink of an eye.
Even more infuriating is the death of Mafatu's beloved dog, Uri. The relationship between a boy and his dog is very special indeed, and God help the shark who comes between them. When the hammerhead attacks the fish trap, poor old Uri slides into the water. Mafatu is angry and fearful in equal measure, but his anger and fear embolden him to jump straight into the water and kill the shark.
Sadly, Mafatu doesn't save the life of his beloved dog, but he has at least shown exemplary courage beyond his years, and has taken another huge step on the road to manhood. Though sad at the fate of his late canine companion, Mafatu feels more than a touch of pride at his brave, decisive actions.