By opening the switch you don’t change the stage of the input, it just goes from Vcc to floating (or undefined) potential that by the 08 gate is still read as “H” ..
With TTL gates you have to physically connected them to GND or use low-ohm pull-down resistor;
For TTL-LS gates (Iil<400uA, Vil<0.4V) the pull-down resistor can be 1kΩ ..