Being admitted into a selective school doesn't really directly lead to you getting a high ATAR. An individual that gets into say, James Ruse can still get a mystery number if they don't try, and still get a 70 if they put in minimal effort.
In terms of the entire ranking thing, selective schools particularly only admit academically gifted and highly motivated students, whilst providing the environment, resources and facilities to allow such students to academically excel. Meaning good study materials, quality teachers who know what they are doing, high quality facilities and an environment that pushes everyone to be competitive and study in order to bring out their maximum potential (Which is huge as people are inherently influenced by their environment and groups that they associate themselves with). Most of which a lot of rank ~200-400 schools lack
In this respect, rank 2 in James Ruse will very likely be in the >98th percentile for most exams due to students being academically gifted and being provided the necessary resources to succeed. Whilst rank 2 in a ~400 school may only be ~70-80% due to the resources and learning environment simply not being up to the standard of more privileged areas. This was very largely the case with my school
Despite this, when people say that "School doesn't effect your ATAR", they are true, but it seems that you are taking it in the wrong context. If a student in a ~400 school hammers down and gets #1 ranks in every subject (which many people, including BoS friends of mine have) their ATAR isn't dragged down by their cohort come externals. Meaning they can very well get a 99.95 regardless of not being admitted into a selective school, which i can ensure you has happened before and will continue to happen in the future.
The bottom line is that the HSC is about hard work. If you work hard and play your cards right, any ATAR is achievable regardless of your school or socio-economic background.
To put things into perspective. I went to a rank >300 school
My dux got 99.65
Second highest ATAR was 97.85
Quite sure BoS members such as Maxwell and SuchSmallHands got amazing ATAR's (like >99) while not going to good schools