Gastric juices can go back into the esophagus and cause heartburn if the valve mechanism muscles do not function properly.