When we ingest food, the epiglottis covers the trachea and the uvula covers the nasal passage. But what happens when we breathe? Why does the air go into our trachea and not the oesophagus?
Swallowing food requires muscle strength to force the food down the oesophagus, which is a soft tube that collapses when empty, simply because the body is very crowded (space-efficient) and empty spaces collapse unless forced open. Only when you swallow, the oesophageal muscles force space to be made for food coming through.
In contrast, the trachea and bronchi are covered in almost-circular or C-shaped cartilage which holds them open and stable for air to flow through. You can see it here: http://en.wikipedia.org/wiki/Bronchi.
Concluding, air does not enter the oesophagus because it is always closed. Additionally, when the chest expands for breathing, the lungs expand and create suction down the trachea and not into the stomach (simply because this is where they connect).
The exception of course is if air is trapped in the swallowing motion with (or without) food. In this case it will enter the oesophagus and cause you to burp.