A spring is compressed till it assumes a state. No more compression will be allowed, this state will be preserved by continuously 'holding on' the spring. Throughout the compression process, all the energy we passed on would add to the potential energy of the spring, and to nothing more. But when we 'hold on', no increment in potential energy could be seen. Where are we unknowingly passing the energy?
When "holding" the spring, you're not "unknowingly passing the energy" because you're not doing any work. If the spring is held in a compressed state in the jaws of a vice, say, then it will stay like that indefinitely. No work is being done on a compressed spring held in fixed "state". If the spring is being held by your fingers, it's the same thing, from a physics perspective. From your perspective, it seems like you're doing work because you have to spend energy to keep your muscles holding your fingers in position against the force of the spring.
It's the same as standing still holding a heavy weight in your arms. Mechanically speaking you are not doing any work, but you'll still get tired eventually!