Advanced placement classes are designed to give additional challenges to more advanced students who want more from their high school experience.
Core courses at US universities (e.g., Composition 101) are designed to ensure universal standards at university (in the case of Composition 101, every student should be able to structure an argument in the form of a basic essay). For those students who are already advanced, many universities offer the chance to test out of core courses or to actually use AP credits in their stead.