When I watched Zetsuen no Tempest, the whole time I was working off the idea that it was a form of 'defense mechanism'.
It should be somewhat obvious, that turning them into Iron / Black Iron was just it's unique form of an attack (just as people with guns can fire bullets, and people with swords can swing them). That appeared to be it's power for killing / disabling them.
As we can observe, the tree has a certain favoritism for Hakaze Kusaribe. The tree would've been doing what it thought was 'beneficial for Hakaze', and innocent people being caught up could just been result of the tree freaking out. After saving Hakaze from the Time Prison, it no longer cared that much about others. Just who to protect, and what to prevent.
...Tree of Beginnings devours civilizations and attempts to dispose Fuwa Mahiro and Takigawa Yoshino because the Tree of Beginnings had accomplished its goal by using Fuwa Mahiro and Takigawa Yoshino to save Hakaze from the time prison.
As for 'how it prevented the Tree of Zetsuen / Exodus's revival', having the innocent people caught up did not have anything to do with it. As long as it caught one of Samon's allies in every 100 innocent, it'd be successful.