Two fold question. Background: water to sink and shower shut off for two months prior to shutting main to replace cold water valve. I drained all faucets except the shower. When I removed the valve, drained 6 gallons without diminishing. So I put the new valve on screwed to the old nut/ferrel. Hardware store guy was mystified. Could it just be there was extra water in the system due to not draining the shower nearby?? (I didn't because the grout wasn't sealed.) Now facing replacing the hot water valve and am more worried about the situation getting out of control, having to deal with hot water instead etc. So I have been trying to educate myself on how the repair relates to the cold water supply (to the heater) and turning the heater to pilot. That is aside from the draining question. The new grout is cracked and needs to be replaced so I don't think I can freely drain the shower yet. I can try draining the shower into the bucket and all other sinks but the one I am working on. So bewildering for a novice.
Often time when you try to drain a cold water line it will siphon from the water heater tank. That could very well be where your "gallons" of water are coming from. One work around for this is to open up other faucets to break the siphon. An alternate is to shut off the valves that let water into and out of the water heater tank.