It is often correlated with size for public High Schools. If you don’t have enough students to fill up those 30 different AP courses than you won’t offer that many. Just like larger high schools can offer more languages but smaller ones may just offer Spanish.