In general, the state of auxiliary qubits which are used during computation is entangled with the state of output qubits. This entanglement prevents interference from happening, which in turn leads to unwanted results.
As a demonstration, assume that we will start with an equal superposition then calculate the state $|x\rangle|(x ∧ ¬x)\rangle$ and finally apply Hadamard gate to the first qubit. Since $|(x ∧ ¬x)\rangle$ is always $|0\rangle$, applying Hadamard gate should cause a destructive interference and the output state should be $|00\rangle$.
Now, to calculate $(x ∧ ¬x)$ we will use an auxiliary qubit to store $¬x$ then ANDing $x$ and $¬x$ in the output qubit:
circ = QuantumCircuit(3)
circ.h(0)
# Use auxiliary qubit to calculate ¬x
circ.cx(0, 2)
circ.x(2)
# Calculate x ∧ ¬x
circ.ccx(0, 2, 1)
circ.h(0)
The resulting circuit should look like
The output of this circuit is:
As you can easily see, the destructive interference didn't happen.
However, if we modify the previous circuit to uncompute the value of the auxiliary qubit:
circ = QuantumCircuit(3)
circ.h(0)
# Use ancilla qubit to calculate ¬x
circ.cx(0, 2)
circ.x(2)
# Now, calculate x ∧ ¬x
circ.ccx(0, 2, 1)
# Uncompute:
circ.x(2)
circ.cx(0, 2)
circ.h(0)
The circuit plot:
Now the destructive interference takes place and the output state (without the auxiliary qubit) is $|00\rangle$.