You have the initial state $|000\rangle$. The first Hadamard gate on qubit zero sends the register to $\frac{1}{\sqrt{2}}\left(|000\rangle + |100\rangle\right)$. Then, the $\text{CX}$ controlled on qubit zero and target on qubit one takes the state to $\frac{1}{\sqrt{2}}\left(|000\rangle + |110\rangle\right)$. And the next $\text{CX}$ between qubit zero and qubit two takes it to $\frac{1}{\sqrt{2}}\left(|000\rangle + |111\rangle\right)$. At this point we have a maximally entangled $\text{GHZ}$ state, but we are still missing a final $\text{CX}$ gate. This is between qubit one and two, with qubit one being the control. Thus, the final state is $\frac{1}{\sqrt{2}}\left(|000\rangle + |110\rangle\right)$. Therefore, as you can see, qubit three will always be projected into $|0\rangle$ when measured in the $Z$ basis.