If these muscles do not function properly, gastric juices can go back into the esophagus and cause heartburn. This is known as gastro-esophageal reflux.