The answer would be Prevents reflux of air back into the chest
Pneumothorax happens if there is hole between the visceral pleura and parietal pleura which normally have negative pressure. This allow the air slip out into the space, prevent the lungs to expand. Chest tube is placed in the pleura to remove the air while the water seal the tube so the air from atmosphere won't go inside.