This is consistent with people who entirely incorrectly claim that sourdough bread is GF. Traditional sourdoughs give bacteria and yeasts a lot of time to eat various sugars and starches.
There is a moderately well supported theory that most "gluten intolerance" issues are actually intolerance of FODMAPs: certain fermentable sugars and short-chain starches found in a wide range of foods, most notably wheat. If you remove gluten from diet, you have likely also significantly reduced your FODMAP consumption. But gluten itself isn't a FODMAP, and I once baked an experimantal loaf of low-FODMAP bread using spelt flour and vital wheat gluten. (It wasn't very good.)
We've gone GF at our house because my wife has coeliac disease. But we use very few commercially-prepared GF products; we cook at home from basic ingredients, and simply avoid the gluten-containing grains.
If you basically went gluten free by relying on products from the supermarket "free from" section, I can imagine it's easy to gain rather than lose weight.
The weight loss was an unexpected side effect.