If the noise is a Spirax drain valve (a regular pop pop pop) then it is a valve positioned at a low point in the air system. All the vale is is a metal disc in a valve body. The air pressure holds the disc down and bleeds through a pin hole to create an opposing air pressure under the disc. Once the pressure under overcomes the pressure above the disc (it's to do with the larger surface area under the disc) then the disc lifts, allowing air and water to escape. But immediately it does lift, the air pressure underneath is also expelled so the disc snaps closed again. And so on. and on. and on!
It is not designed to get rid of excess water. Any water is not the braking system's friend. The spirax is designed to expel ALL water from the air system.
Quite a lot of more modern rolling stock have air driers fitted, and a correctly working air drier should keep the air system dry, so there should be no need for a spirax, Westinghouse or any other type of auto drain valve. I know 66s have both air driers and drain valves, a bit belt and braces. Some older locos (eg. 47s) have several spirax valves fitted, and these work all the time there is air in the main res system, even with the engine shut down. Can be very annoying!