C8 is a filter, to remove high frequency noise from the input, and to average the current, so the turn on spike as the capacitance of the wiring and mosfets will not falsely trigger the comparator, as it slows the rise of the current sense voltage, allowing for the motor inductance to be the dominant source of voltage, so the driver can switch off the mosfet switch when the current in the coil has exceeded the required current cut off point.
If it is not there the charge injection of turning on the mosfet Q2,4,6 will otherwise appear as an extra current flow in the sense resistor, and thus with a moderately high current in the coil turn off the driver early, before the current is correct to provide the required torque in the motor.