Yeah that's the weird part, that she was able to leave the course and cut off a chunk of it without apparently being noticed.
I would imagine - well, depending on the formality of the event - that there would be frequent 'checkpoints' to log intermediate times and calculate average speed, like once per kilometer or so or even more frequent. If cheating is that big of an issue, of course.