Air contains dust particles. When we inhale air, these dust particles in the air enter our body. Fine hair and mucus present inside the nose trap these dust particles and prevent them from getting into our respiratory system.
No such filtering system is present in the mouth. Hence inhaling air through mouth may harm us.