The main purpose of the abs is not to do situps but to stabilize the spine.
The spine is a bit like an antenna mast.
The antenna mast have guy-wires to stabilize it against external forces such as wind:
The spine also have guy-wires in the form of muscles running from the base of the spine: the pelvis to the upper part of the spine:
The body can adjust the tension in these muscles thereby bending the spine in different directions.
As an experiment hold a somewhat heavy dumbell with both hands in front of you close to your stomach. Now move the dumbell straight out in front of you:
You should feel your abs tightening up. Perhaps you can also feel your lower back muscles tightening.
The situation is analogous to a bending cantilever beam from mechanics:
Here we know that the force F causes a bending moment M=FL at the fixed end, where L is the length of the beam.
Likewise the dumbell causes a spinal flexion (forward bending) moment at the spine: M=FL, where F=mg is the force of the dumbell and L is the length of the arms.
In order to stabilize against this moment the body tenses the erector spinae muscles of the back:
However due to the s shape of the spine the erector spinae pulling on the spine causes extension in the top of the spine but flexion in the lumbar region.
This flexion in the lumbar region must be countered or the intervertebral disks in the spine could be injuried (from Starting Strength):
In order to counter this we instinctively tense the abs to create intra abdominal pressure that counters this flexion of the lumbar region:
The body create this intra abdominal pressure by tensing the innermost ab muscle: the transversus abdominis:
but also the rectus abdominis muscle:
and the obliques:
This co-contraction of the abs and erector spinae is explained further here.
It was measured with EMG in an highly influential experiment from 1996 (1) and (2) where subjects were instructed to rapidly raise and lower their arms, like the alarmist robot in “Lost in Space.” In those with healthy backs, the scientists found that the transversus abdominis tensed several milliseconds before the arms rose. The brain apparently alerted the muscle to brace the spine in advance of movement.
Movements where you hold a weight in front of you such as eg. a goblet squat or a deadlift makes your abs work hard, and trains the abs without them changing length (isometrically).
Other exercises that also work the abs isometrically include the plank and push-ups.
A special case is when you hold something heavy on the side with one arm:
In this case the oblique on the other side have to work really hard to avoid sidewise bending of the spine.
(1) Australian physiotherapy experiment
(2) The paper on that experiment