There are two reasons;
1) It helps make them last longer as dry, brittle latex comes off the glove easier than wet latex.
2) It helps the ball stick to the glove better.
See here for how that happens.
The latex foam has tiny holes, exactly like a kitchen sponge. The holes are small and brittle when dry, but when you get them wet, they expand and get bigger and softer (just like a kitchen sponge again). The tiny holes then act as tentacles like an octopus has. Spit will do the job, but water is easier, a little more hygienic and does not result in your mouth getting dry.
Read here about the power of the squeezy bottle.