Lactobacillus bacteria produce acid when they eat, which helps them survive in acidic environments. However, stomach acid can still kill some of them. Bifidobacterium bacteria are not as tolerant to acid, so more of them are killed by stomach acid. However, most of the bacteria still manage to survive. Your stomach doesn't hold onto food until it's fully digested; instead, it processes food partially and then passes it through.