Swallowing excess mucus or phlegm may cause discomfort. It is better to cough up and expel phlegm, especially when it is thick, or there is a lot of it.
Clearing mucus and phlegm helps remove irritants and bacteria from the airways.