We are not trying to maximize overlap in this diagram, quite the opposite. You can imagine it rather as pushing negative charges, the negative ligands ions, unto the electrons on the central atom while looking at the orbital energies during this process. That is a repulsive interaction between two negative charges, that raises the energy of orbitals that closer to the negative charges.
The $d_{xy}$ orbital and the $d_{x^2-y^2}$ orbitals are in the xy-plane with 4 ligands close to them. The $d_{yz}$ and $d_{xz}$ orbitals are in the yz/xz -plane where 2 ligands are further away. This means they go down in energy, as the repulsive interaction with the approaching ligands is lower. The $d_{x^2-y^2}$ is actually the "worst" energetically, since it points directly towards the 4 closest ligands. This is why it is the highest in energy. The $d_{z^2}$ orbital goes down since we just increased the distance with the ligands.
"MO" explanation:
The explanation for the $d_{xz},d_{yz}$ and $d_{xy}$ remains the same. You are correct when you say that their symmetry doesn't fit any bonding ligand orbital symmetries. The lowering and raising of the energies is purely due to the new geometry. When we go from octahedral $O_h$ symmetry to $D_{4h}$ symmetry, we lose the energetic degeneracy due to symmetry. I.e. the degeneracy in the octahedral geoemetry is due to the fact that these orbitals form a basis for the the irreducible $T_{2g}$ representation. This degeneracy of the set $(d_{xz},d_{yz}, d_{xy})$ is lifted in $D_{4h}$. The orbitals belong in $D_{4h}$ to $E_g$ $(d_{xz}, d_{yz})$ and $B_{2g}$$(d_{xy})$. There is no symmetry reason for these two different sets to be degenerate in $D_{4h}$, i.e. the geometry with the elongated z-bonds. And the argument for there relative energy ordering is just the same as given before. These nonbonding orbitals are more stable if they are further apart from negative charge, i.e. the ligands. When we draw these plots we typically assume total orbital energy conservation, and to achieve this we must push one up if we lower two others. I.e. the ones in the z-plane go down and the other goes up such that the "center of energy" remains constant.
The $d_{z^2}$ orbital shown in your figure corresponds to an antibonding molecular orbital. By increasing the distance of the ligands by elongating the z-distance, the overlap becomes smaller and the energy splitting between bonding and antibonding becomes smaller, i.e. the bonding orbital(which is not shown in your figure as it lies way below the d-orbitals) goes up a bit and the antibonding goes down a bit. The $d_{x^2-y^2}$ was in the octahedral geoemetry degenerate with the $d_{z^2}$ orbital as both together formed a basis for the $E_g$ representation. This degeneracy is lifted in $D_{4h}$. In this case we conserve the center of energy of the $E_g$ set. Since we know that the $d_z^2$ orbital goes down, we must have the remaining $d_{x^2-y^2}$ orbital go up.
You should also rather look at actual molecular orbital diagrams instead of looking at crystal field diagrams. Its easy to get confused by mixing up ideas from crystal field theory, ligand field theory and molecular orbital theory.
I used the following character tables
Answer to question in comment:
My wording "more stable" was perhaps a bit vague. I mean that the non bonding orbitals are lowered in energy with respect to their energy in the octahedral geometry. Why is this ? Well, the energy does not change due to overlap with some orbitals. It changes due to the lower magnitude of the coulomb interaction of the ligand orbitals with the non bonding orbitals when the ligand orbitals are further away, which is the case in the elongated geometry.
Even if orbitals can't mix, they still affect each others energy simply due to the fact that they represent negative charge distributions. Bringing non mixing orbitals together raises their energy even if their shape doesn't change at all. You could calculate the potential energy due this interaction by
$$
E_{pot} \propto \int dr_1 dr_2 \frac{|\phi_{nonbonding}(r_1)|^2 \sum_{\text{Remaining orbitals}}|\phi_b(r_2)|^2}{|r_1-r_2|}
$$
This positive energy contribution to the total orbital energy decreases with distance between the orbitals and thus the nonbonding orbital energy decreases as the ligands move away. A term like this is also part of MO theory.