tl;dr; The achievement gap is a hard problem. Our schools are working on it, but are only making small progress.
Our area has a bicameral distribution of scores and GPAs. It is both home to many low-income, hard-working English learner Latino families and at the same time the bedroom community for a UC campus that is strong in STEM and has a good amount of high-tech industry. The school has to serve all its populations. It works hard to involve all families in parent organizations, etc.
In my son’s specific case, he took Alg II/Trig in 9th, which was the normal advanced track (prior to Common Core integrated math). He took Precalc online through Art of Problem Solving the same year. That didn’t count for credit, but there is a calculus readiness test that all students have to take in order to take the dual-enrollment Calc BC offered at the HS campus. So 9th was the sensible year for him to take the SAT II in math.
The school offered an extra section of AP Physics B the last year before it was replaced by AP Physics 1&2–believing correctly that a lot of students would prefer that over 2 years of physics, which they might not be able to fit into 4 years. They offered seats in the class to 9th graders taking Alg II after offering it to upper grades.
The school isn’t super advanced as far as curriculum. They offer no math after Calc BC, unless you want to count AP Statistics. They have never offered AP Physics C, though it is listed in the catalog.