In present times sorbet is often eaten as a desert, however it is still used as a palette cleanser during meals in many places.
It is presented, before, during or after the main course, it is done at this time because this is often the heaviest course of a dinner, and therefore is usually the one you want to clean your palette around.
The difference in temperature from the ice-cold sorbet to the warm meal, will wake up your taste buds, so you get the full experience of the next course without any lingering flavors. Helping you to savor the individual textures and tastes of the dish you are consuming.