Sorbitol is used in toothpaste as an agent to stop toothpaste from drying after opening. Without sorbitol, toothpastes would dry up and have a flaky consistency. It is a know laxative, but most likely the amounts used in a toothpaste would not cause any of the gastrointestinal side effects.
Glycerin has a use in toothpaste similar to sorbitol, it help keeping the toothpaste moist by stopping it from drying after opening and exposure to air. It is non-toxic, although some people can have allergies to it.