The sticky, slimy goo plays an essential role in fighting off infections, shaping the gut microbiome and more.