I'll give in my 2 cents as I've seen both sides of the spectrum.
In 2015 I sat my selective test and all went well, I made it in but I didn't go, the school was 2 hours away and I just decided to go to my local school, I thought going to a decently ranked school wasn't so important and it really didn't matter, nobody really told me it was going to affect my HSC and I was in Year 6 so I wasn't thinking ahead of time anyways.
Fast forward to now I'm now in a selective school (Transferred in Year 11) after 4 years of pain in a really badly ranked school I can finally compare it now. Sure it takes 1hr 50 mins to get there and I waste so much time on travel, but I'm never going back. Lets talk about my previous school, before 2007 this school never even got a rank, it was that bad and generally gets 1-10 Band 6's a year. Let me begin by saying that if you're in a selective environment you are like 100x better off than a kid that's in a local public school environment (that also wants to succeed), there's obviously a few exceptions, some public schools are okay like Cherrybrook and Carlingford and you can definitely succeed in them, but the majority fall within the 300-400+ ranks. Now I can't speak for every public high school because I reckon my one was really bad, it even came on the news for a fight conducted every year. Here are some of the reasons why a selective school can be so much more advantageous.
1. More motivated students.
2. Way better people in general, your bag won't be attempted to be stolen and your other belongings.
3. More resources in coaching centres, you're automatically placed in better classes because of your school.
4. No fights, people don't act like animals and most people aren't weird at all, compared to the previous school that is.
5. You don't have to make friends with people into "Eshay" culture bullshit or people that are just going to be associated with crime later on in life. People literally carried knives in their bags at school and attempted to steal money off people.
6. You become like the people around you. If you're in a selective environment you work more harder because the people around you do. If you're in a really bad school, (Unless you are very stubborn) in some way you will become like them too.
7. You have to take initiative and study on your own, you can't simply ask the kid next to you what he's up to and try to race up to what's he has completed.
8. You don't have to act solo and alone. To do well in my previous school you're going to literally have to be solo if you want to do well in the HSC, it means that you shouldn't be talking to anyone or chatting at recess or lunch because of heavy distraction of non-study related conversations and activies. Instead you should be using every spare time to study and using every bit of your time to do well, in the end you don't have the same resources as a kid in a selective or good ranking school so you will need to use more time in study to get equivalent results. This means studying ahead of the syllabus by a year to keep a safety net.
Initially when I was in my local school I hated it so much, but since I've moved I hate it even more even though I'm not even there anymore, I've realised how good it is outside of there. These are some of the points I can come up with, there's obviously so much more that I can't think of right now as i've written this briefly . Note that i compared this with my previous school and it does look a bit exaggerated but I assure you it is not. Maybe not all public schools are like this and it was just my previous school.