Sometimes they are required when taking certain medications - not sure which ones.
Both B-12 andf folic acid are heklpful in destroying homocysteine, a produce of protein decomposition, which is very toxic to the endothelium of the heart and a significant factor in cardiac disease. Therefore, among other reasons, levels of B-12 and folic acid should be maintained. It appears you have a very conscientious personal physician.
Your doctor must think you are deficient in B12 or have a type of anemia.