Not all high school classes are the same.
College admissions officers look for certain types of classes on their applications.
They like to see plenty of math, foreign language and science classes. They also like to see honors level classes and AP classes.
Enrolling in and successfully passing an AP class is the best way to show that you can take and pass a college-level course.
It kind of proves you are built for college.
And if you can pass the AP exam for that class, you can usually earn college credit for it too. Pretty nice.
Enrolling in honors level classes shows that you are willing to challenge yourself by taking hard courses in high school and not just taking the easy classes.
Those admissions people like to see that you took on difficult classes.
They can tell whether or not you coasted through high school.