The answer is thermodynamics, and the assumption that you're working in a colder environment than the temperature corresponding to a Planck distribution where your photons would be "on average" fairly present. In other words, inside a star, where it is hotter, the atoms are NOT in their ground state most of the time - in fact, if it is hot enough, they are in their "highest state" which is an ionised state: you have a plasma. It is simply because most atomic matter has energy levels with differences that are much larger than the average photon energies at "room temperature" (about 26 milli-eV) that we tend to say that atoms and molecules are in their ground states. It is because at these low temperatures, it is statistically favorable to have energy spread out more than in concentrated excited states.
BTW, you can see that with rotational states of molecules: at room temperature, these are usually NOT in their ground state and excited rotational states don't "decay to ground state". It is because their energy levels are below 26 meV.
So when you "shine light on an atom" in a cold environment, you put it out of thermodynamic equilibrium, and it will tend back to equilibrium which is its ground state. When you "shine light on an atom" in a hot environment, it will not fall back to its ground state, because that's not its equilibrium state.
An atom in a cold environment will decay to ground state through spontaneous emission, which has an exponential time decay that is depending on the specific state and is quite difficult to calculate.
You are asking about electron de-exitation, and there are basically two main types of processes involved, in any case, the electron/atom system moves to a lower energy level if there is such a lower energy level available:
- spontaneous emission:
In this case the excited atom/electron system transitions to a lower energy level, while emitting a photon. This form of emission is mainly a QM phenomenon, and you are asking why it happens. In this case, the answer is quantum mechanics itself, a trigger for the process can only be understood with the explanations in QED and vacuum fluctuations.
Spontaneous emission in free space depends upon vacuum fluctuations to get started.[7][8]
https://en.wikipedia.org/wiki/Spontaneous_emission
- stimulated emission
In this case, an incoming photon of a specific frequency can interact with the electron/atom system, and cause it to transfer to a lower energy level.
The liberated energy transfers to the electromagnetic field, creating a new photon with a phase, frequency, polarization, and direction of travel that are all identical to the photons of the incident wave. This is in contrast to spontaneous emission, which occurs at random intervals without regard to the ambient electromagnetic field.
https://en.wikipedia.org/wiki/Stimulated_emission
It is very important to understand that I mentioned everywhere a photon emission but there are mainly two types of such processes, radiative and non-radiative transitions. In the case of the latter no photon is emitted.
Just a note, there are other forms of transitions, like fine and hyperfine transitions too.
Best Answer
The electron is not who "wins" energy. The increase in energy corresponds to the system electron-nucleus. The "incoming" energy is stored in the system, by increasing the distance from the nucleus to the electron.
The configuration of the atom, is such that always "looking" the lowest energy state for the system.