Here you have gently
lowered the mass onto the spring. Once placed in its new equilibrium position (where the spring is compressed by an amount x = mg/k), it just sits there. Note that your hand does work (negative work) on the mass as you lower it, reducing the total energy of the system.
Here you just release the mass. So all the initial gravitational PE remains to be converted to spring PE and kinetic energy, with none being removed by your hand. When it gets to the equilibrium position (at x = mg/k) it still has kinetic energy left, so it keeps going. It reaches the point x2
= 2mg/k, where the KE is momentarily zero, then comes back up. It will continue to oscillate between the two extreme positions.