A hiatal hernia happens due to a weakening of the diaphragm muscles. In most cases, the cause of this weakening is unclear, but risk factors include aging, traumatic injury, and abdominal surgery. The hiatal hernia can also be congenital (present at birth) or develop in those who have an abnormally large hiatus.