According to the Crystal Field Theory (CFT), it is given that ligands (their lone pairs) approach the central metal along the axes. When they approach, the degeneracy of the $\mathrm{d}$ orbitals is lost. The explanation:
The $\mathrm{d}_{x^2-y^2}$ and the $\mathrm{d}_{z^2}$ orbitals(the $\mathrm{e_g}$ orbitals) are oriented along the axes while others are oriented in between the axes. In octahedral geometry having complexes, when the ligands approach, they approach along the axes and thus the $\mathrm{e_g}$ orbitals which are along the axes experience more repulsion. Hence, these orbitals increase in energy more than the $\mathrm{t_{2g}}$ orbitals. Thus, the orbitals split in energy due to the approach of ligands.
My question is why do the ligands (their lone pairs) have to approach along the axes. They can approach from anywhere.