Water flowing through tank even though cold water valve is shut off
There could be several reasons for the water to keep running after you shut down the cold water inlet and opened the drain on the tank. If your water heater is in the basement or otherwise below the domestic hot water system as your water drains the hot water that is in the system will continue to drain down toward the hot water heater - simple gravity. However, that should only be for a few minutes. Opening the upstairs hot water faucets will speed it along. It will never take hours.
Your problem is the cold water valve is apparently not shutting down completely. If it's a gate valve it's not uncommon for them to get stuck in a partially open position even after the handle is fully in the closed position. If that's the case you should replace it with a quarter turn ball valve. They are much more reliable and easy to turn off in an emergency.