Your rank relative to your cohort in a particular subject is an important element that is used in determining your Assessment Mark for the subject. The Assessment Mark is the mark that reflects your internal performance in a subject, and contributes 50% of your overall HSC mark for that subject. Your rank is one of two elements that is used as part of a process called moderation, the other element being Examination Marks (i.e. HSC exam marks) achieved by students in your cohort. The Examination Mark contributes the remaining 50% of your overall HSC mark for that subject. carrotsss's post is a very good summary of this process. The main rule is that the highest and lowest Assessment Mark will be adjusted to equal the highest and lowest Examination Mark achieved by any student in a cohort respectively.
Consider a positive example, where Student A has performed consistently well in their internal assessment tasks and exams in a particular subject, allowing them to place first in their cohort. Because Student A was able to place first, the highest Examination Mark achieved by any student in their cohort (including Student A) will also become Student A's Assessment Mark. For instance, if the highest Examination Mark of 95 was achieved by Student B, Student A will also receive 95, but as their Assessment Mark, because they placed first internally.
Another student, Student C, also performed well, although not as well as Student A, and was able to place third overall. The third highest Examination Mark in the cohort was 90. Here, the basic premise mentioned earlier may not necessarily apply (because we are no longer dealing with the student ranked first), meaning that Student C will not necessarily receive 90 as their Assessment Mark, although their Assessment Mark will be similar (see the discussion of relative differences/gaps in carrotsss's post). It could, for instance, be 89.
This brings us to the notion of trying to rank as high as possible as outlined by carrotsss, which enables a student to maximise their Assessment Mark. Additionally, an important thing to note is that the marks that you achieve in your internal tasks and exams are only used to determine your rank relative to your cohort in a particular subject. The mark values themselves do not serve a purpose beyond that.
I hope this helps!