The crystal field splitting is based on where the ligands (modelled as point charges) are in relation to the orbitals. In an octahedral complex, the ligands are all at 90° from each other and are placed on each of the x,y,z$x,$ $y,$ $z$ axes. The orbitals that lie on these axes will experience the most repulsion and will rise in energy, while the orbitals between the axes ($\ce{t_{2g}}$)$(\mathrm{t_{2g}})$ will lower in energy as they experience less repulsion from the ligands, and the average overall energy is maintained.
I can only assume that the degree by which the $\ce{e_g}$$\mathrm{e_g}$ orbitals are raised is the same due to the $\ce{d_{z^2}}$$\mathrm d_{z^2}$ orbital technically being a linear combination of what would have been the $\ce{d_{z^2-x^2}}$$\mathrm d_{z^2-x^2}$ and $\ce{d_{z^2-y^2}}$$\mathrm d_{z^2-y^2}$ orbitals. This means that the $\ce{e_g}$$\mathrm{e_g}$ orbitals lie on the axes to the same extent as each other, so experience the same overall repulsion from the ligands.