What exactly is lattice energy?
In summary: IE and EA are just partial terms in the formation enthalpy of solid ionic compounds, that includes also LE and atomization enthalpy of elements. Their values alone can give a hint, but do not provide the final word.

Notice that the text says nothing explicit about ion pairs.
IE + EA relate to free gaseous unbound ions. Like:
$$\ce{M(g) -&gt; M+(g) + e-(g)}\tag{IE}$$
resp.
$$\ce{X(g) + e-(g) -&gt; X-(g)}\tag{EA}$$
The lattice energy (LE) is the energy released by forming solid ionic compounds from free ions:
$$\ce{ M+(g) + X-(g) -&gt; MX(s)}\tag{LE}$$
Gaseous ion pairs have already released a part of the lattice energy.
Note that for ion pairs, the pairing energy may be smaller than the sum of IE+EA, especially for big ions, so forming pairs may not be favoured.