Mid drive motors are powerful. It puts a lot of torque through the chain.
The thing is that when you are shifting the chain through the gears, the motor does not know that. This gear sensor will auto-detect the shifting and cuts out the motor power for a sec. This way, the gear shifting is safe. You do not have to worry about breaking the chain and derailleur.