Some problems ask: for each node, what's the answer if that node were the root? Naive approach: run tree DP times, once per root. That's . Rerooting does it in using two passes.
First, compute answers with an arbitrary root. Then, "move" the root to each neighbor efficiently by adjusting the dp values. When does root choice matter? If depends on the direction of parent-child relationships, different roots give different answers.