From the mountains of Bhutan...
For the second time in as many years, in the dead of night, a water buffalo lumbered into the village square and promptly fell into the community well. Ernie, the village engineer, argued that the citizens of the village should stop using the well and instead install a system of water pipes from the artesian spring on the mountainside behind the village.
Ernie embellished his plan with a motor timer, a large electric snap-action water valve, and a flow regulator. The system would, he said, provide a reasonable, continuous flow of clean, potable water during the daytime. The excess flow could irrigate a system of flower beds, replacing those that the water buffalo's brief but devastating rampage had destroyed. At night, the valve would shut, removing from the central village square the attractive nuisance of fresh water available to the local livestock.
The villagers approved. They raised a fund and launched Ernie on a journey to the nearest city to procure the necessary supplies. Ernie felt lucky to have this position. Tucked away high in the mountains of Bhutan, he could devote his engineering skill to the cause of social progress. He felt needed. The villagers built him a hut when he arrived. Here, he could forget all the unpleasantness of his last assignment.
When he returned from the city, Ernie labored for weeks burying 2500 feet of 4-in. steel irrigation pipe leading from the spring to the village far below. He installed the valve and controller at the receiving end of the pipe. When the electric valve finally snapped open, water gushed from the pipe at a rate of 30 gallons per minute, just as he had planned.
The villagers shouted and tossed their hats in the air. They plugged the old well with sand. They threw a feast. Later that night, as Ernie sat basking in the glow of his recent success, he heard the electric valve click shut. The pipe exploded, and an unstoppable mass of water, the whole unregulated flow of a 4-in. pipe, flooded the village.
Ernie failed to take into account the momentum of the enormous column of water moving inexorably toward the village; 2500 feet of 4-in. pipe holds about 13,000 lbs of water. That much water does not just suddenly stop moving because someone closed a snap-action valve.
You must slowly shut down these types of systems—over a much longer time than the round-trip delay of pressure waves traveling end to end throughout the system. At a propagation velocity of almost 5000 feet/sec, the round-trip propagation delay of pressure waves traveling there and back through Ernie's column of water is about 1 second. Slowly closing the valve over a period of, say, 10 seconds would reduce by a factor of 10 the peak amount of pressure needed to stop the movement of all that water.
Electrical circuits obey a similar principle. Currents flowing in a long wire possess inductance, a property much like the momentum of flowing water. Suddenly arrest the flow of current at the end of a long wire, and you will see a brief but intense inductive-voltage spike. If the spike is sufficiently large, it can destroy your circuit just as easily as Ernie's plumbing blew up his chance at a successful second career.