That is one of the reasons people have issues absorbing nutrients as they age. A lot of it also has to do with changes in the gut microbiome. If people do not eat a variety of foods the bacteria etc, in their guts becomes less and less diverse. Their ability to absorb nutrients and digest various foods eventually becomes severely compromised.
This is a much greater problem as people get older and long term habits begin to catch up with them. That is why cutting out entire food groups such as fruits, vegetables, and grains to avoid carbohydrates can be so harmful in our later years.
...and sufficient stomach acid KILLS bad bacteria so when you’re low, the bad bacteria proliferates. In fact, that causes the gut to bloat which opens the sphincter muscle at the top of the stomach, allowing acid to enter the esophagus, giving people the erroneous idea that they have high stomach acid.