Classmates, teachers, school e.t.c are factors that affect how well you do, but they are not the main factor. Ultimately it comes down to you. How determined you are to work hard for the year. It comes down to what you put in, not everyone else. You could go to a great school with a great atmosphere and great teachers, but if you don't put the work in then you won't get the result out.
There are a fair few people who are naturally smart who don't perform well in VCE because they are just, well.... lazy/unmotivated and don't put the work in throughout the year, contrasted to students who work consistantly throughout the year and perform well in the end.
Look at it this way, I didn't go to a great school, I didn't have many great teachers (well there was one or two, but the majority weren't), we didn't always have the resources that the private schools and some public schools have (was having trouble finding practice exams at one stage), we didn't have a strong cohort to help push each other and didn't have any tutoring but I worked hard throughout the year, I was determined to give it my best shot to see what I could actually get. In the end it paid off, got above 97.
What I'm trying to say is that, at the end of the day, the other factors do have an effect, they just make it a little bit harder, but if you are determined enough, you can overcome this, and achieve the score you want (within reason).