Air that is breathed directly through the mouth into the lungs is not filtered.
Breathing through the nose filters the air before it enters the body.
The hairs inside nostrils filter any foreign particle in the air and it only lets the clean air pass through.
The mucus of the nostril collects potential contaminants where they are destroyed by nasal enzymes before they can enter the body and cause harm or make the body sick.
So, Breathing through the nose is said to be healthier than through the mouth.