This study found that xylitol blocked adhesion of bacteria to epithelial cells, showing that xylitol inhibits bacteria from sticking to tissue, which allows the body to wash them away.
Kontiokari, T., Uhari, M., & Koskela, M. (1998). Antiadhesive effects of xylitol on otopathogenic bacteria. The Journal of Antimicrobial Chemotherapy, 41(5), 563–565.