Gastric juices can go back into the esophagus and cause heartburn if the valve mechanism muscles do not function properly. This is known as gastro-esophageal reflux.