Why do molecules have to first transform to gas before doing a reaction? I have to calculate the enthalpy of the reaction
$$\ce{Cs(l) + 1/2I2(s) -&gt; CsI(s)}$$
and the answer is
$$\Delta H_f = \Delta H_{vap}^{\ce{Cs}} + \frac{1}{2}\Delta H_{subl}^{\ce{I2}} + \frac{1}{2}E_{diss}^{\ce{I2}} + I_1^{\ce{Cs}} + E_A^{\ce{I}} + E_N.$$
I can see that the molecules are first put to gas state before creating an ionic bond.

Why does it have to do it ?
In which case do the molecules have to first go in gas state before reacting ?
Is it only in case of ionic bond ?

Notes:


$E_{diss}$ is the energy of dissociation between the to atoms $\ce{I}$.
$I_1$ is the energy of first ionisation.
$E_A$ is the energy of electron affinity.
$E_N$ is the energy of neutralisation between $\ce{Cs+}$ ans $\ce{I-}$.
Not all reactions require vaporization. This process looks like the Born-Haber cycle for cesium iodide, an exercise in Hess's Law usually used to fill in one of the missing values in the cycle that might be hard to measure (usually lattice energy, but not always). The Born-Haber cycle can also be used to drive general chemistry students crazy.

The $E_N$ "energy of neutralization" looks like the lattice energy, which is defined as the enthalpy/energy change accompanying the formation of a solid crystal lattice from the gas phase ions. In your case, the lattice energy of $\ce{CsI}$ is defined as the energy change accompanying the following reaction:

$$\ce{Cs+ (g) + I^- (g) -&gt; CsI(s)}$$

Because the lattice energy is defined for gas phase ions, you need the vaporization enthalpies for this process. Not all reactions require this vaporization step.