Take a look again at the Hamiltonian, which is
$$
H = \sum_{\langle i, j \rangle} J_{i j} Z_i Z_j + \sum_{i} h_i Z_i
$$
Then notice that ZPowGate is generated by the the Pauli Z operator, and CZPowGate is equivalent to an operator generated by $Z \otimes Z$ up to single-qubit rotations. The idea is that Step 2 of the ansatz corresponds to applying a pulse generated by the term on the right-hand side, and Step 3 corresponds to applying a pulse generated by the term on the left-hand side. Applying pulse sequences generated by terms of the Hamiltonian of interest is a common motivation for ansatz choice (see here, here, or here for papers that use this principle).
Step 1 of the ansatz is included as a gate generated by a term which does not commute with the other terms. Without such a gate, multiple steps of the ansatz could just be collapsed together and the ansatz would not be very interesting.
An alternative view of why it makes sense to include Step 1, and this kind of ansatz more generally, is explained in Section VI of the QAOA paper. The idea is motivated by quantum computation by adiabatic evolution. In such a computation, one prepares the ground state of an easy Hamiltonian, which in this case would be
$$
B = \sum_{i} X_i
$$
and evolve under the time-dependent Hamiltonian
$$
G(t) = (1 - \frac{t}{T} B) + \frac{t}{T} H
$$
for some total evolution time $T$. It turns out that a large enough evolution time $T$ will guarantee that the system ends up in the ground state of $H$. If you discretize this time evolution, you will get a bunch of time-steps which are like the ansatz: each time step has a gate generated by X on each qubit, and then gates generated by terms of the Hamiltonian. The idea then is to fix the number of time steps and then take the angles of the individual gates to be variational parameters. For a large enough number of ansatz steps, there will certainly be some choice of angles that gives the ground state, but the hope is that a small number of ansatz steps will suffice.