Maori chiefs were fighting among themselves. Queen Victoria offered the treaty so there will be law and order in the land. Maori also wanted the new technology brought in by the settles such as farming tools, weapons, tobacco and alcohol.
Some Maori were worried about the behaviour of some settlers especially in Russell. The Maori wanted law for the settlers so they could behave.
For years the missionaries tried to encourage the Maori to form their own government and state. The chiefs could not come to an agreement themselves and so the treaty brought them together.
The British wanted to protect their place in New Zealand because they had more than 2000 settlers already living in New Zealand. They also did not want the French to take over. That is why the treaty needed to be written and signed urgently.