The teachers have to be trained to teach the AP course. For some schools that are already maxed out on teaching courses, this may mean hiring more teachers, which not every school has the resources to do. For certain courses, there is no guarantee that students would take if offered. For example, the Computer Science AP course was discontinued due to low interest and for other schools, many students aren’t able to reach the AP level (ex: math) by the time their senior year rolls around. Other schools offer IB and dual enrollment courses. Since colleges evaluate students in context, sometimes it isn’t as valuable for schools to add AP courses and they decide to use the funding for other things (ex: underperforming students)