It makes no sense to sprint, ‘hit the wall’, and simply not finish the race, or spend much of the time on hands and knees recovering from that initial bout of excessive enthusiasm. Nor does it make any sense to walk most of the way, finishing the race with unused reserves of energy.
Neither approach is likely to lead to running the race in a personal best time. And that is why experienced athletes constantly check their pace, making sure it is neither too fast nor too slow.