Q:

Why is there no electron swapping after excitation?

If we have 2 electrons in the 1st energy level named X & Y, and one electron in the 2nd energy level named Z.

If the electron X was excited and transferred to the higher energy level, why didn't Z replace it in the 1st energy level?  
Why don't we say that there is a type of nuclear gravity, and it increases when the atom becomes unstable and that gravitates Z electron towards the nucleus instead of the excited one?

A:

On the first part: it will, or won't, in a subsequent, separate process.
If you excite the system and promote an electron from the lowest orbital to the next orbital, the immediate result is that you have a lowest orbital populated by one electron and a higher orbital populated by two electrons. It is an excited state, and will tend to relax back to the fundamental state if there is an available mechanism to do so - but that will be a second distinct event after the excitation. In fact, the excited state can, depending on the circumstances, last long.
The second part makes no sense. The nature of the interaction between nucleus and electron is not gravitational (it's electromagnetic), and the lowest energy level isn't "below" in any spatial sense. The gravitational analogy is misleading.

