When reading the redbook I found:
glutDisplayFunc(void (*func)(void)) is the first and most important event callback function you will see. When
glutDisplayFunc is called whenever your window must be redrawn. This includes the time when one calls glutPostRedisplay :)
When does a window need to be redrawn?
But what if your display function paints a triangle at position x;y where x;y; are determined by the mouse position? In this case you must ask the system to redraw the window whenever the mouse is moved right? That's why you'll call glutPostRedisplay from MouseFunc(). Actually when you call glutPostRedisplay, the redraw event is queued along with other window-events, like mouse click ets. Essentially what your mainLoop does it pick events from that queue and call their handlers