Duodenal obstruction is caused by failure of recanalization of the duodenum during embryological organogenesis. It classically presents as a "double bubble" sign on x-ray or ultrasound. I understand that the more proximal (left-sided) dilation is due to gas in the stomach, but what is the cause of the more distal (right-sided) dilation?
Duodenal obstruction is classified as either stenosis (narrowing of duodenum) or atresia (complete occlusion of duodenum). In both cases, a "double bubble" sign appears because of gas trapped in the stomach (proximal) and proximal duodenum (distal). The narrowing between the two bubbles is due to the hypertrophied pyloric sphincter maintaining some constriction.
In duodenal stenosis, there might be some gas distal to the obstruction. Duodenal atresia almost never presents with distal gas, unless there is anomalous bile duct anatomy providing a source of air distal to the obstruction.
Example of anomalous bile duct anatomy: