The acid in your stomach is what allows your body to digest and breakdown food molecules, so when your stomach is not producing enough stomach acid, many food will not be properly digested. Another reason for food to not be digested is a disorder called gastroparesis. Gastroparesis is when the stomach takes too long to empty food.
The disorder is a result of abnormal movements in the muscles in the stomach which can be caused by nerve damage or muscular disease. There are many instances that can cause gastroparesis such as certain cancer treatments, eating disorders, infection, and even hypothyroidism.