Looks to me like a bug has just flown into it's ear and it doesn't like it, and blames the nearest.... tree.
It looks like some neurological impairment. Is this "normal" behavior for a cassowary?