FWIW:
A few years ago, someone verbally mentioned to me that some study found evidence of some sort linking type of bacteria in your gut to obesity. (No, I don't have a link.) This fits at least partially with my personal experience: In the quest to get myself well when doctors said it could not be done, I ended up slimming down tremendously in the last year or so. That was not a goal. I did not care about my weight and neither did my doctor since being underweight is far more typical of my condition and is far more immediately life threatening. My main goal was to kill infection and get my body working closer to normal, which included doing a lot of work on my gut health, both in terms of gut chenistry and gut flora.