This is because the entrance to the trachea is guarded by a flap called the epiglottis. When the bolus( mass of food) reaches the junction of the pharynx then the larynx or the voice box which is located at the entrance of the trachea is pulled upward to bring it close to the back of the tongue and then the flap(epiglottis) closes the opening of the trachea.