If the hole gets plugged, the water can't get out, and eventually will make it start to rust.
Normally, when it was new, the water drained out the small hole and into the cowl, and then it could dry out under the gasket.
Once its rusted: On my truck in the pic, it wasnt rusted enough to get to leak into the cab itself. but on a lot of trucks, the rust hole will be WAY bigger, and if the rust reaches the wrong part, back by that pinch weld (or at the pinch weld itself) and eats a hole back there, then water can get inside the cab. also another popular place they rust is under the cowl where the wiper arm linkages are. leaves and pine straw, etc. get there and decompose and then sit there. rust will start eventually there too.
I've seen trucks that once the windsheild was removed, there were literally slots rusted through by the pinch welds, all the way across the cab.
Look where the pinch welds are in the pic. the outer layer, is the same piece that is over the cowl. the inner layer is all thats between the inside and outside of the cab. if the outer layer rusts through, water just goes to the cowl and runs off. if the inner layer rusts through, water can get to the inside of the cab behind the dash.