Many foods are a natural source of B because of bacterial symbiosis. It is produced by some of the gut flora of herbivores. Carnivores, of course, eat herbivores. Also algae and plants get it from symbiosis. So, by one route or another, animals must get vitamin B from bacteria (and archaea).