I'm not sure if the trolls' real, conscious intention is to harm and destroy humans. I've had doubts about it ever since we saw the train giant say "help me" to the very humans it attacked. I think aggression is simply the only interaction they're capable of - they actually seek help but whatever corrupted their bodies also corrupts their actions into violence. That's my headcanon, anyway.
Well, in some cases troll reaction could be explained by simple hunger - like toothy troll that attacked Emil. Or, nest protection.
In some cases, the origin of reaction is not clear. For example, jelly-brain trolls. Its unclear, would they attack the expedition if cat-tank would NOT crash into their nest and kill one of them. Even the completely peaceful creatures would probably consider such action as hostile.
Sjødraug was even stated in official documents to be relatively passive, non-hostile creature, and its agressive reaction also may be explained by harm that expedition inflicted.
But the leaftroll was clearly hostile. It doesn't just attacked; it tracked expedition for a long distance, despite the fact, that it was alone and too small to have realistic chances of sucsess. Injured, it tried to retreat, whic indicated not completely automatic hostility (for example, worker bee would protect the hive despite any i njures). And the giant that attacked Emil and Lalli was clearly hostile; the attack was unprovoked, took a lot of efforts just to move out of the building, and could not be explained just by hunting (too many efforts for just two small humans)