Why does the acid in the stomach not kill the bacteria that causes Stomach Ulcers?

Quite simply, the bacteria are acid-stable which is to say, they can live just fine in a pH that low (about 2). Bacteria throughout the world have adapted biochemically in order to survive in various extreme environments such as the thermophiles in the springs at Yellowstone national park.