There are two reasons why high school students should take community college classes during their high school years.
The first reason is to boost the GPA for every A earned in a college course. One college course in any particular term equates to one year of high school credit (10 credits). Many high schools will transfer the credit back for high school credit and the college course will be factored in to the high school transcript and the high school GPA. By doing this, students can earn additional high school units and therefore reduce their class load during their senior year. There are some high schools that will not take college classes back for high school credit. If this is the case, the UC and CSU applications still allow reporting these classes on the application, and the CSU/UC applications will weigh these classes into the overall high school GPA automatically.
If high schools do not take college classes for high school credit, then students can accumulate college credit to help them fulfill general education requirements or lower division major requirements while in high school, and this will enable them to graduate college one or two terms or even a year early. Most high schools will give students these two options: to use it for college credit or to use it for high school credit.