Summer classes are for the advancement, or recovery of, credits.
If a student fails a class they often have to take summer school to make up for the failing grades and lost credits.
But most students don’t take summer school unless they want to get credits or pass classes ahead of time. In most cases, summer school isn’t necessary.