Backtracking VS DFS
Backtracking
If there are multiple paths to reach node 'A', in backtracking you visit that 'A' node multiple times through different paths.
DFS
However in DFS you only hit the node once even though there are multiple ways to reach the node.
Thus in DFS you don't actually care about the state of the variables in following a particular path in the recursion tree, however, you care about them in the backtracking.