Why does the membrane of a neuron not stay at its depolarized state?
Three facts:

The K+ ions are heavily concentrated on the inside while the Na+ ions are heavily concentrated on the outside

The Na+/K+ ion pump is unidirectional. It can only pump K+ ions inside the cell while expelling the Na+ ions.

Finally only the Na+/K+ ion pumps can restore the ionic equilibrium.



The full scene:

Once the threshold is reached the Na+ voltage gated channels open up. So Na+ ions rush in, causing depolarisation.

Then the Na+ channels close while the K+ channels open. This causes rushing of K+ ions outside, thus slowly reducing the potential difference starting the process of repolarisation

Now the Na+/K+ ion pumps are geared up as the extracellular concentration of K+ and intracellular concentration of Na+ ions are high (which is the ideal environment for the pump to work.




PS:
Without the high extracellular concentration of the K+ ions the pump can't function any faster than the basal rate even though the intracellular concentration of Na+ ions exceed the normal value by many times. High concentration of K+ ions in the extracellular environment is essential for restoration of the ionic equilibrium.


Edit:
I meant unidirectional in the sense that when actively pumping sodium is always pushed out while potassium is always pushed in.
Thanks to AliceD for pointing out that when the gradient is reversed, the pump synthesizes ATP due to forced movement of ions in the opposite direction.