The anomaly is properly accounted for in Quantum mechanics. More specifically in regards to the Hartree-Fock method of approximation. That would be the simplest method to try and understand it, but to understand more then then equation(s) (which still takes advanced math skill to understand and work) requires comprehensive knowledge of quantum mechanics.
In short, the electron-electron repulsive forces in the d orbitals are greater then the electron-electron repulsive forces in the s-orbitals. Only in certain occasions when electron spin is being paired is it energetically favorable to "promote" the electrons. It happens to work out for Palladium, with its atomic size, effective nuclear charge, electronegativity, etc etc is the magnitude of the d electron-electron repulsive forces less than then magnitude of the differences in the orbitals.
If you want to know more become a physical chemist.
Point of interest, this is inconsequential. There are many mathematically predicted, and just as likely electronic configurations for the other elements that varies from the traditional values reported in the table. It does not really effect the chemistry, it is however have great importance when dealing with spectroscopy.