help understanding this recipe gluten free and vegan
You have several oily ingredients like coconut oil and nut flour. Oil is one of the 2 ingredients that make a cake moist and it helps retain the moisture. The other is simply water.
In addition to plain water there is xantham gum in the recipe. Xantham gum binds a lot of water and retains it, keeping the cake from drying out. That's why only 1g of it is needed to incorporate 100g of water into the cake. If you leave the xantham gum out of the dough, the cake would probably be very soggy if it wasn't baked long enough or too dry if it was baked for too long. Hitting the perfect spot between soggy and dry would be much harder and the cake would dry out within a day or two after baking.
And lastly there is rice flour and sweet potato. Both of them contain starch (and the sweet potato also adds a little more water to the cake). When starch gets cooked (or baked in this case), the molecules swell and can retain moisture much better than uncooked starch. You can see the effect when cooking a pudding / flan / blancmange.