@anon300123 - Hydrochloric acid and calcium carbonate both occur naturally, but in very different ways. I think HCl is only really found in the stomachs of animals. It's really reactive, so if it was to occur in nature outside of a contained situation like the stomach, it would quickly react with everything around it until it was gone.
Calcium carbonate is in all kinds of things though, like eggshells and lime, and it's found in a lot of rocks. I think it mostly gets mined actually, although I don't know if that's what they put in the medication.