Areas such as the nose contain specialised cells called goblet cells which have but one function - to produce snot/mucus - rather like our sweat glands which can output pints of fluid in practically no time at all when required. The snot is used to trap and flush out foreign bodies and protect the delicate lining of the nasal cavity - at times of illness it is also a route of excretion of expended white blood cells, used up in combating your infection. It is an unpleasant but vital function.