Ex: I went to Bronx Science, a specialized high school in NYC where 98% of the students are above grade level and go to college. The principal at the time was known to be an obvious subject of nepotism and generally made poor decisions often. The guidance department was a joke. Teachers were above average because schools full of smart kids attract smart teachers, but not so amazing that they'd make up for kids who started below grade level if there were any.
My wife actually went to the same high school and got depression, she dropped out of BX Science and went to a much lesser rated school. The teachers there were actually better in many ways (more organized, better processes, really useful classes work skills and stuff were available due to grants) but the students were still generally below grade level and less than 1/3 went to college according to the stats. She was effortlessly at the top of her class even though she was severely depressed and missed days all the time.