Because an atom's energy doesn't depend on one quantum number only. In other words, if you model the electronic configuration of the multi-electron atom/ion as to resemble the hydrogen's, then there are other effects to take into account (spin, special relativity, screening of the nuclear charge by the inner electrons). There's no 100% accurate theoretical description of the Aufbau Principle, but there are rigorous arguments in favor of it.
If all was simple, then 1s < 2s < 2p < 3s < 3p < 3d < 4s < 4p < 4d < 4f < 5s < 5p < 5d < 5f < 5g < 6s ... would be the normal energy diagram (as for the plain simple H-atom/hydrogenic ions in Schrödinger's description), but due to a myriad of effects (symmetry of the spin-spin couplings between electrons, special relativity), we have these inversions: 1s < 2s < 2p < 3s < 3p < 4s < 3d < 4p < 5s < 4d < 5p < 6s < 4f < 5d < 6p < 7s ...