Bacteria can't create mass, even when they divide. During division, you go from one "big" bacterium to two "little" bacteria, which then have to accumulate nutrients and grow bigger before they can divide again.
When nutrients are plentiful, this can happen rapidly, and you do see exponential growth. But the exponential growth phase is only valid when there is an excess of food in the environment. Bacterial growth curves follow a typical lag/log/stationary/death profile. The log (exponential) phase only applies when nutrients are in excess. Whenever some nutrient becomes limiting (because it's already incorporated into another bacterium, for example) the bacteria switch to stationary phase growth, and reduce replication or stop it completely.
So you would never get an "explosion" of intestinal bacteria - the bacterial mass is strictly limited to the amount of mass (food) input into the system. Once that's all (or mostly) converted, the bacteria will stop growing and start dying.
If you kept accumulating mass in your intestine, you're correct that eventually it would "explode". However, most people regularly (pun intended) eliminate excess intestinal contents. (Which, as bpedit mentions in their answer, contains a high proportion of bacterial cells.) This limits the total mass contained in the intestine, and keeps it from "exploding".