Mice that have a specific defect in their immune system all become obese (Science, Jul 26, 2019:365(6451)). These mice have defective T cells that are unable to recognize harmful invading germs and allow these germs to survive in their colons.
You have about 100 trillion bacteria in your colon that help to control your immune system. Some are healthful and stay in your colon, eat the same foods that you do, and, among other things, help to prevent disease by converting soluble fiber in plants to short chain fatty acids (SCFAs) that lower high cholesterol, high blood pressure, high sugar, and inflammation. On the other hand, harmful bacteria look for more than just the food that you eat, so they try to invade your colon cells and get into your bloodstream. This turns on your immune system (chronic inflammation), which can increase your risk for obesity as well as many other health problems and diseases.
The new study shows that mice that have a healthful clostridial class of bacteria in their colons are almost never obese, while virtually all the mice that did not have this healthful bacteria became obese. Other studies have shown that obese humans also have low levels of the healthful clostridia in their colons. The authors showed that the mice who lacked these healthful bacteria had compromised immune systems that failed to kill harmful colon bacteria. Evidently, the harmful bacteria prevented these healthful bacteria from growing in the mice’s colons. The authors say that they have found that the healthful type of clostridia prevents obesity by producing a chemical that blocks fat absorption. As the mice aged, their immune systems functioned less effectively, allowing harmful bacteria to grow in abundance to prevent the healthful clostridia from growing in their colons. The obese mice also developed signs of type 2 diabetes.
Feeding these mice with compromised immunities a healthful diet did not prevent obesity, but feeding them healthful clostridia prevented them from becoming obese. However, the authors feel that their findings cannot be recommended for humans. Many other studies have shown that giving healthful bacteria ("probiotics") to humans does not prevent obesity because the probiotic bacteria disappear soon after the person stops taking them. You need to make a permanent change in your diet to make a permanent change in your colon bacteria. See Should You Take Probiotics?