Gastroenterologists break down the effects of coffee on the stomach, mainly as a result of certain compounds triggering acid production.