So lets look at some actual facts about B12, we know that adults can store around 2-5 mg of vitamin B12 and that approximately 50% of this is stored in the liver. Around 0.1% of this is used in the gut and may be lost due to not being reabsorbed. Bile from the liver is the main form of our B12 excretion. The liver can store several years’ worth of vitamin B12, hence the reason why the problems take a while to manifest.
Our B12 reserves can become depleted if the delicate balance of secretion and absorption is unsettled. This can occur in many ways but the route typically understood by most medical doctors is that the patient simply isn't getting adequate B12 via their diet, so they receive the regular injections. In my experience (and I'm just an observer, not a medical doctor) its more about the liver our ability to store and absorb B12.
As stated above its a delicate balance of how much B12 is actually in our diet (food quality & quantity), how much is secreted (are you using more than you take in?), and how much is absorbed (you may have a diet high in B12 but be unable to absorb it).
Key factors to look for are an inefficient liver, poor bile and a toxic overloaded liver. If your one of those individuals who can't tolerate carbohydrate and avoids them, i.e you don't digest them well it may be that your liver function isn't great.