# Why does the ns orbital go before the (n-1)d orbital when writing transition metal electron configurations?

It doesn't. The $\left(n - 1\right) d$ orbitals, PARTICULARLY in the last-column transition metals, are consistently lower in energy than the $n s$ orbitals... and as such, we should be writing $3 {d}^{10} 4 {s}^{2}$, $4 {d}^{10} 5 {s}^{2}$, and $5 {d}^{10} 6 {s}^{2}$.
See how the $3 d$ orbitals are lower in energy than the $4 s$ for the first-row transition metals here:
And you can further see how the Aufbau principle fails for the heavier transition metals, in that the $\left(n - 1\right) d$ and $n s$ orbital potential energies criss-cross rather unpredictably: