From physiological studies, it is well known that two-joint muscles (such as the hamstrings) will contract most forcefully when only one end is in action (shortening). Simultaneous joint action at both ends of a two joint muscle (when both ends of the muscle are being pulled to the belly of the muscle at the same time) produces a weaker contraction.
In the glute-ham-gastroc exercise the gluteus maximus and the upper end of the hamstrings contract initially to rotate your pelvic girdle backwards. In this action, these muscles raise your trunk when your spine is kept rigid by strong isometric contraction of the erector spinae.
When your trunk is in line with your legs, the upper hamstring tendons and muscles goes into isometric contraction to hold this position since it is impossible to execute hip hyperextension. (See previous descriptions and explanations of hip joint extension/hyperextension).
After this, the lower end of the hamstrings (mainly the tendons and the biceps femoris) and the gastrocnemius contract to perform knee joint flexion. This action continues to raise your body, which should remain rigid. The contraction of the lower tendons of the hamstrings and short head of the biceps femoris occurs while the upper hamstring tendons and total muscle are shortened and held under maximum tension.
This results in a "super-maximal" contraction of the entire muscle. In other words, at the end of the exercise, both the lower and upper hamstring tendons and the hamstring muscles are in maximal contraction.
In this exercise both ends of the hamstrings go into contraction in sequence, not simultaneously, to create maximum shortening. This is essentially why the glute-ham-gastroc exercise is so effective for total hamstring development. It is also the reason that this exercise is used effectively in rehabilitation and for the prevention of hamstring injuries.