Sometimes there are three valves in the water heater bypass plumbing. The purpose of the bypass avoids filling the 6 gallon water heater tank with 6 gallons of RV antifreeze at $4 a gallon.
Take a look at my bypass arrangement. There is a valve on the blue cold water line into the water heater at the bottom. There is a valve on the red hot water line out of the water heater at the top. And there is a third valve on the bypass line between the two water heater lines.
When you open the two water heater line valves, and shut the bypass valve, the water has to go into the tank, get heated, and then go out of the tank.
When you shut the two water heater line valves, and open the bypass valve, the water is prevented from entering the water heater tank and takes the short cut "bypass" line.
Maybe I have thoroughly confused you...