Slimy saliva contains digestive enzymes that help canines (and humans) break down their food. Saliva also wets the throat for a smooth snack-slide right into the belly. But that all happens inside the body.
Drooling occurs when there's a saliva spill. It's simply biomechanics:
Some dogs, such as bulldogs and mastiffs, have such short snouts they have trouble containing their saliva and the leakage constantly pours out. Bow-wows with folded skin around their mouths, such as St. Bernards, bloodhounds and Bassett hounds, are also big drippers.