In short, because a staff member overrode the capacity. This can happen in a couple ways. In both scenarios, the staff member will see a warning message.
If a staff member goes to add a customer into class and sees a message that class is full they can then choose to add the customer into class anyway, overriding the capacity.
Another way might be if a customer is transferred from another class and the class they're being added to is full. In this case the max capacity settings for the new class can also be overridden, which may cause the class to end up overbooked. In this case, a warning message will also show.