What is the basis for exceptions to the Aufbau principle?

What is the basis for exceptions to the Aufbau principle?