Hatches are left open all the time. This sub was not at sea but in harbour. A sub is an enclosed/confined space. While in port it would have been undergoing all sorts of maintenance work. Hatches are left open for ventilation, access, even to run power cords for electric tools. It is not unusual for someone welding stuff inside a ship to require the nearest hatch to be left open for a long period of time.