I'm not entirely sure about the whole moderation process either, but would there have to be a very small disparity between first and second then? Wouldn't first get the highest internal mark from the exam? I've had it explained to me so many times and I think I get more confused every time!
You don't need to be 1st in course, but yeah you'd probably need to be close (I state ranked Legal from 2nd place, but we were only about a mark apart)
This is basically because moderation tends to keep the relative distances the same, but give or take. So,
sometimes that 'give or take' can mean that 2nd place overtakes 1st place in their HSC mark - And that can mean they state rank, but 1st place doesn't.
As an example:
BILL: Exam Mark of 94, Internal Mark of 94
BOB: Exam Mark of 98, Internal Mark of 93
BILL MODERATED INTERNAL: 98 (directly taken from highest exam mark)
BOB MODERATED INTERNAL: 96 (because Bob was close second to Bill internally, so he is close second to Bill after moderation as well)
The HSC marks are average of moderated internal and exam:
BILL HSC MARK: (98+94)/2=96
BOB HSC MARK: (96+98)/2=97
Bob ended up higher than Bill! Hopefully that gives you the rough idea, more detail
here if you like!