Just to add, citric acid is NOT vitamin C - that's a common misconception. Vitamin C, a water-soluble antioxidant, is actually known as ascorbic acid and is often found with, but is not the same as, citric acid, one of the dominant acids in citrus fruits.
In relation to stomach acids, the pH of the stomach is usually around 2. It provides a chemical barrier against food-bourne infection but, as highlighted by Jason (above), this line of defence is not perfect and bugs can slip through the net. Moreover, some bacteria and viruses are specifically adapted to tolerate highly acidic conditions and use to their advantage the relative protection that it offers. For example, rather like some plants that depend on fire to germinate their seeds, some viruses (like rotaviruses which cause food poisoning) rely on the harsh environment of the stomach to partially digest the outer coat of the virus to make it infectious. And Helicobacter pylori, which causes ulcers and gastric cancer, secretes a metaphorical suit of armour in the form of a thick protective alkaline mucus that keeps out the stomach acid.
Chris
"I never forget a face, but in your case I'll make an exception"
- Groucho Marx