To avoid attack, it mimics a tree. It will run off if splashed with water, which it hates.
If a tree branch shakes when there is no wind, it's a SUDOWOODO, not a tree. It hides from the rain.