What causes a hiatal hernia?

Unknown. The hiatus is the normal hole in the diaphragm muscle thru which the esophagus passes to go from the chest to the abdominal cavity. A hiatal hernia is an enlargement of this opening thru which the stomach can slip up into the chest. This is found in 15% of people & rarely causes symptoms. It is unclear if this develops before birth and/or develops in response to elevated abdominal pressure.
See below. The esophageal hiatus is an anatomical feature traversed by the esophagus on its way from the chest to the abdomen. When muscles and ligaments that define the boundaries of the hiatus weaken or become lax, the upper stomach may transiently or permanently reside in the chest. This is a hiatal hernia. Uncommonly, the entire stomach or other organs (colon, small bowel, spleen) may herniate as well. .
Stretched opening . There is normally an opening in the diaphragm to allow passage of the esophagus, the tube that connects the mouth to the stomach. This opening, also called the esophageal hiatus, can stretch out and become larger than the esophagus. Because the chest is like a vacuum, the stomach can herniate into the chest. Exactly why this happens in is mostly unknown.
Mostly unknown. Most cases are from unknown reasons likely a genetic predisposition of that area of diaphragmatic opening to weakness.
One known contributing factor is obesity, obese people have higher incidence and it is more symptomatic in them.