You get a dry mouth during public speaking because when you are nervous the body is set into the fight or flight state.
This is caused by an activation of the autonomic nervous system.
It is seen throughout the animal kingdom, and has evolved to help the animal deal with dangerous situations, when escaping from predators, for example.
The nerves are selectively activated, depending on how important they are for the response.
Because eating is not considered to be important at this time, you want to get the hell out of the place, the nerves to your mouth that control the salivary glands are suppressed, so your mouth dries up.
In addition, your pupils dilate and the blood vessels to your muscles and heart are enlarged in order to get the blood to the most important organs needed for whatever drastic action is necessary.
This is tied to the fight or flight reaction.
In a tense or dangerous situation, your body shuts down all unnecessary functions, including the digestive system.
Your saliva glands are a part of it. You don’t need to digest your last meal if a lion is trying to make you his next.
This is also where butterflies in the stomach come from.