Getting into an advanced class generally means you already know the material that would be in the normal class (taking trig the year everyone else is taking geometry, for instance). How did you get to where you already knew that material? Well, you were either in the advanced class the year before, or, you already learned the material outside of class. How did you already learn the material outside of class? Better education at home. Which is easy to do with a private tutor or stay at home parent; really hard to do with a single parent, or dual income that don't allow for much in education expenses.
And because you are in an advanced class, you basically get a .5-1.0 bump to your GPA (so people are graduating with a 4.5 GPA at some schools), all because you had the extra early resources; you can't compete with just what the school provides.