What is the function of cilia in the respiratory system?
Most cilia in the respiratory system serve as a contamination filter or some component of a system thereof. The highest concentrations exist in your nose and trachea, but they are in other parts of the system, as well.
They work together with goblet cells (which produce mucus) to filter out dust and other particles that the vibrissae in your nasal airway hadn't filtered out.
Moreover, they function as part of the mucociliary escalator, moving organisms/pathogens out of the respiratory system that have been inhaled.
So your snot has a purpose!