Bifidobacteria undoubtedly like resistant starch (RS). They bind and hold on tight, an effect mediated by cell surface proteins. Big thanks to Tim Steele for passing along many of the studies cited here. One of said studies showed that treatment of bifidobacteria with proteases abolished the RS binding; but even dead critters would bind if their cell surface proteins were intact (Crittenden et al., 2007).
I suspect fermented foods have this all figured out. The microbes in sauerkraut are going to be embedded in & all around the cabbage polysaccharides; likely protected from digestive enzymes (to a degree) and holding on tight.
Something similar has been shown for galactooligosaccharides (GOS) (Shoaf et al., 2006). In this study, GOS, but not a variety of other fibres, inhibited the binding of pathogenic gut microbes to intestinal epithelial cells.
These mechanisms are likely not mutually exclusive, and both seem like they could benefit the host (us).