Air is heated when it is compressed, and that hot/warm air carries moisture from the atmosphere. If the water trap is not far enough away from the compressor for the air to cool off prior to reaching it, much of the moisture will pass right past the water trap.