I think the flooding situation in the film is obviously utter bullshit. But this is a device to save you from suffocating in a fire, and possibly if you’re in a high-rise or upper floor, since that sort of design of sewer pipe is how it tends to be there, meaning beyond the U-bend will always be a lot of air (of questionable freshness). There’s not going to be water coming up the top.